/* ============================================
   FILTER SECTION STYLES
   ============================================ */

.controls-section {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.filter-label i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Choices.js Customization for RTL */
.choices {
    direction: rtl;
    text-align: right;
}

/* Prevent FOUC (Flash of Unstyled Content) */
select[multiple]#standards-filter {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: none;
}

select[multiple]#standards-filter.choices__input {
    opacity: 1;
    height: auto;
    overflow: visible;
}

/* Show when Choices is initialized */
.choices + .originally-select-hidden {
    display: none;
}

.choices {
    opacity: 1 !important;
}

.choices__inner {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    min-height: 48px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.choices__inner:hover {
    border-color: var(--primary-color);
    background-color: #fff;
}

.choices.is-focused .choices__inner {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 157, 97, 0.1);
}

.choices__list--multiple .choices__item {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 2px;
}

.choices__list--multiple .choices__item.is-highlighted {
    background-color: #2f804f;
    border-color: #2f804f;
}

.choices__button {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    margin-right: 6px;
    padding-right: 8px;
    padding-left: 0;
}

.choices__list--dropdown .choices__item--selectable {
    padding-right: 15px;
    text-align: right;
}

.choices[data-type*='select-multiple'] .choices__button,
.choices[data-type*='text'] .choices__button {
    position: relative;
    display: inline-block;
    margin: 0 8px 0 -4px;
    padding-right: 16px;
    border-right: none;
    border-left: none;
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
    background-size: 8px;
    width: 8px;
    line-height: 1;
    opacity: 0.75;
    border-radius: 0;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: rgba(58, 157, 97, 0.1);
    color: var(--primary-color);
}

.choices__group {
    font-weight: 700;
    color: #2c3e50;
    padding: 10px 15px 5px;
    border-top: 1px solid #e0e0e0;
}

.choices__group:first-child {
    border-top: none;
}

/* Responsive */
@media (max-width: 768px) {
    .controls-section {
        padding: 20px;
    }

    .controls-section .row {
        gap: 20px;
    }

    .filter-wrapper {
        margin-bottom: 15px;
    }

    .controls-group-center {
        justify-content: center;
    }
}

/* Page Header */
.page-header {
    margin-bottom: 25px;
}

.page-header .main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.page-header .lead {
    font-size: 1.1rem;
    color: #6c757d;
}

@media (max-width: 576px) {
    .page-header .main-title {
        font-size: 1.8rem;
    }

    .page-header .lead {
        font-size: 0.95rem;
    }
}

/* ============================================
   EMPTY STATE MESSAGE
   ============================================ */

.filter-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin: 40px 0;
}

.filter-empty-state .empty-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.filter-empty-state .empty-icon i {
    font-size: 4rem;
}

.filter-empty-state h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.filter-empty-state p {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .filter-empty-state {
        padding: 40px 15px;
    }

    .filter-empty-state .empty-icon {
        font-size: 3rem;
    }

    .filter-empty-state .empty-icon i {
        font-size: 3rem;
    }

    .filter-empty-state h3 {
        font-size: 1.2rem;
    }

    .filter-empty-state p {
        font-size: 0.9rem;
    }
}

/* ============================================
   EMPTY FILTER MESSAGE (No Standards Found)
   ============================================ */

.empty-filter-message {
    width: 100%;
    text-align: center;
    padding: 20px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

.empty-filter-message p {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .empty-filter-message {
        padding: 40px 15px;
    }

    .empty-filter-message i {
        font-size: 3rem;
    }

    .empty-filter-message h4 {
        font-size: 1.2rem;
    }

    .empty-filter-message p {
        font-size: 0.9rem;
    }
}
