.search-bar {
    display: flex;
    align-items: stretch;
    margin: 0 auto;
    padding-bottom: 48px;
}
[lang="ar"] .search-input-wrap #clearBtn {
    left: 38px;
    height: 20px;
    display: flex;
    align-items: center;
    border-left: 1px solid #D1D5DB;
    padding-left: 10px;
}
[lang="en"] .search-input-wrap #clearBtn {
    right: 38px;
    height: 20px;
    display: flex;
    align-items: center;
    border-right: 1px solid #D1D5DB;
    padding-right: 10px;
}
    .search-input-wrap #clearBtn.hidden {
        display: none !important; /* border disappears with the button — no separate rule needed */
    }
/* wrapper becomes the positioning context for the icons */
.search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

    /* higher specificity than .form-control alone, so it wins over the !important above */
    .search-input-wrap .form-control {
        padding: .5rem 40px .5rem 14px !important; /* right: room for search icon, left: room for clear+mic */
    }

[lang="en"] .search-input-wrap .form-control {
    padding: .5rem 14px .5rem 40px !important;
}

    /* search (magnifier) icon — right side, inside the input */
    .search-input-wrap #search_icon,
    .search-input-wrap > svg {
        position: absolute;
        right: 14px;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        color: #6B7280;
        pointer-events: none;
        z-index: 2;
    }

[lang="en"] .search-input-wrap #search_icon,
[lang="en"] .search-input-wrap > svg {
    left: 14px;
    right: auto;
}


#micBtn.listening {
    color: #1B8354;
}

    /* clear + mic buttons — left side, inside the input */
    .search-input-wrap .icon-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .search-input-wrap #clearBtn {
        left: 38px;
    }

    .search-input-wrap #micBtn {
        left: 8px;
        right: auto;
    }

[lang="en"] .search-input-wrap #micBtn {
    right: 8px;
    left: auto;
}

.search-input-wrap #clearBtn {
    left: 38px;
    right: auto;
}

[lang="en"] .search-input-wrap #clearBtn {
    right: 38px;
    left: auto;
}

      

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    padding: 4px;
    flex-shrink: 0;
}

    .icon-btn:hover {
        color: #374151;
    }

    .icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .icon-btn.hidden {
        display: none;
    }

h1.results-title {
    font-size: 26px;
    font-weight: bold;
    margin: 0 0 6px;
    color: #111827;
}

.results-count {
    color: #6B7280;
    font-size: 14px;
    margin: 0 0 20px;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

    /*.toolbar button {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 1px solid #D1D5DB;
        border-radius: 6px;
        padding: 8px 16px;
        font-size: 14px;
        cursor: pointer;
        color: #1A1A1A;
        font-family: inherit;
    }

        .toolbar button:hover {
            background: #F3F4F6;
        }*/

    .toolbar svg {
        width: 15px;
        height: 15px;
    }

.result-item {
    border-bottom: 1px solid #E5E7EB;
    padding: 22px 0;
}

    .result-item:first-of-type {
        border-top: 1px solid #E5E7EB;
    }

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--dga-gray-200);
    color: var(--dga-gray-dark);
    background: var(--dga-light);
    font-weight: 500;
}

    /*.tag.category {
        background: #EAF3EF;
        border-color: #BFDDCF;
        color: #00522F;
    }*/

.result-title {
    font-size: 16px;
    margin: 0 0 8px;
}

    .result-title a {
        color: #00522F;
        text-decoration: none;
    }

        .result-title a:hover {
            text-decoration: underline;
        }

.result-desc {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.7;
    margin: 0 0 10px;
    /*max-width: 900px;*/
}

.result-date {
    font-size: 13px;
    color: #9CA3AF;
}

.no-results-state {
    text-align: center;
    padding: 48px 20px 40px;
    margin: 0 auto;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #FCEBEB;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

    .no-results-icon svg {
        width: 26px;
        height: 26px;
        color: #E24B4A;
    }

.no-results-title {
    font-size: 24px;
    font-weight: bold;
    color: #111827;
    margin: 0 0 10px;
}

.no-results-desc {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.7;
    margin: 0 0 20px;
}

.no-results-clear-btn {
    background: #00693E;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

    .no-results-clear-btn:hover {
        background: #00522F;
    }

.search-empty-state {
    text-align: center;
    padding: 0px 20px 40px;
    margin: 0 auto;
}

.empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #E1F5EE;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

    .empty-icon svg {
        width: 26px;
        height: 26px;
        color: #00693E;
    }

.empty-title {
    font-size: 24px;
    font-weight: bold;
    color: #111827;
    margin: 0 0 10px;
}

.empty-desc {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.7;
    margin: 0;
}


/* ######################## Filter dropdown */

.filter-wrap {
    position: relative;
    display: inline-block;
}


.filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 300px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 20;
    direction: rtl;
}

    .filter-panel.hidden {
        display: none;
    }

[lang="en"] .filter-panel {
    left: auto;
    right: 0;
    direction: ltr
}

.filter-section {
    padding: 16px;
    text-align: right;
}

[lang="en"] .filter-section {
    text-align: left;
}

.filter-section-title {
    font-size: 14px;
    font-weight: bold;
    color: #111827;
    margin-bottom: 12px;
}

.filter-count {
    font-weight: normal;
    color: #6B7280;
    font-size: 13px;
}

.filter-search {
    position: relative;
    margin-bottom: 12px;
}

    .filter-search input {
        width: 100%;
        padding: 8px 36px 8px 12px;
        border: 1px solid #D1D5DB;
        border-radius: 6px;
        font-size: 13px;
        outline: none;
        font-family: inherit;
        text-align: right;
        box-sizing: border-box;
    }

        .filter-search input:focus {
            border-color: #00693E;
        }

[lang="en"] .filter-search input {
    padding: 8px 12px 8px 36px;
    text-align: left;
}

    .filter-search svg {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
        color: #9CA3AF;
        pointer-events: none;
    }

[lang="en"] .filter-search svg {
    right: auto;
    left: 10px;
}

.filter-options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 2px;
}

    .filter-option.hidden {
        display: none;
    }

    .filter-option label {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        color: #1A1A1A;
        cursor: pointer;
    }

    .filter-option input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #00693E;
        cursor: pointer;
    }

.filter-option-count {
    font-size: 13px;
    color: #9CA3AF;
}

.show-more-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #00693E;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    padding: 8px 2px 0;
}

    .show-more-btn svg {
        width: 13px;
        height: 13px;
        transition: transform 0.15s;
    }

    .show-more-btn.expanded svg {
        transform: rotate(180deg);
    }

.filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #E5E7EB;
}

.clear-filter-btn {
    background: none;
    border: none;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
}

.apply-filter-btn {
    flex: 1;
    background: #00693E;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}

    .apply-filter-btn:hover {
        background: #00522F;
    }
