/* ========================================
   BADGE COMPONENTS
   Reusable badge styles across the app
   ======================================== */

/* ========================================
   CATEGORY BADGE
   Used to display question categories in:
   - exam-test.html (question card)
   - practice-mode.html (question card)
   - study-view.html (question list)
   - dashboard.html (selected filters)
   ======================================== */

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f6f6f6;
    color: #333;
    padding: 0.3rem 0.3rem;
    border: 1.5px solid #333;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.7rem;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.category-badge i {
    font-size: 0.85em;
    opacity: 0.9;
    color: #333;
}

/* Category Badge Variants */
.category-badge.badge-primary {
    background: #f6f6f6;
    color: #333;
    border-color: #333;
}

.category-badge.badge-selected {
    background: #f6f6f6;
    color: #333;
    border-color: var(--primary);
    ;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.category-badge.badge-selected i {
    color: #333;
    opacity: 0.9;
}

.category-badge.badge-unselected {
    background: #ffffff;
    color: #8d8d8d;
    border-color: #8d8d8d;
    opacity: 0.85;
}

.category-badge.badge-unselected i {
    color: #8d8d8d;
    opacity: 0.85;
}

/* Hover state (for interactive badges) */
.category-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 120, 235, 0.2);
    color: #333;
    border-color: #333;
}

.category-badge:hover i {
    transform: translateY(-1px);
    color: #333;
}

/* Small variant (for compact spaces) */
.category-badge.badge-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

/* Large variant (for emphasis) */
.category-badge.badge-lg {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
}

/* ========================================
   USER ANSWER LABEL BADGE
   Shows "Η Απάντηση σου" with pointing hand icon
   Used in:
   - exam-results.html (after user's selected answer)
   - practice-mode.html (after user's selected answer)
   ======================================== */

.user-answer-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #856404;
}

.user-answer-label i {
    font-size: 0.9rem;
}

/* ========================================
   ΠΡΟΕΛΕΥΣΗ BADGE
   Shows the source/origin of a question
   Used in:
   - exam-test.html (question header)
   - practice-mode.html (question header)
   ======================================== */

.proelefsi-badge {
    display: inline-block;
    background-color: #fafaf8;
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.15rem 0.4rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-left: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ========================================
   CHECKBOX ICON STYLING (Practice Mode Modal Only)
   Used in dashboard practice mode category selection
   ======================================== */

/* Style checkbox icons to be larger with white background */
.category-badge i.fa-check,
.category-badge i.fa-square {
    font-size: 1.2em;
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #333;
    border-radius: 3px;
    padding: 2px;
}

/* Checked state - black tick on white background */
.category-badge.badge-selected i.fa-check {
    color: #616161;
    background: white;
    border-color: #616161;
}

/* Unchecked state - empty white box */
.category-badge.badge-unselected i.fa-square {
    color: transparent;
    background: white;
    border-color: #616161;
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Tablet and below (992px) */
@media (max-width: 992px) {
    .category-badge {
        font-size: 0.85rem;
        padding: 0.45rem 0.9rem;
    }

    .category-badge.badge-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.7rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .category-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .category-badge.badge-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .category-badge i {
        font-size: 0.8em;
    }
}

/* Very Small Mobile (576px and below) */
@media (max-width: 576px) {

    /* Hide source badge on very small screens */
    .proelefsi-badge {
        display: none !important;
    }

    /* Show info icon button instead */
    .source-info-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: #f0f0f0;
        border: 1px solid #d0d0d0;
        border-radius: 50%;
        color: #6c757d;
        font-size: 0.9rem;
        cursor: pointer;
        margin-left: auto;
        transition: all 0.2s ease;
    }

    .source-info-btn:active {
        background: #e0e0e0;
        transform: scale(0.95);
    }
}