/**
 * Enhanced Taxonomy Filter
 * Styles that work WITHIN parent theme's dropdown container
 * Parent has: padding: 20px, max-width: 300px, min-width: 300px
 */

/* ===========================================
   GROUP TITLE - Match parent's .dropdown-title exactly
   Parent: font-weight: 700, font-size: 16px, line-height: 26px, color: var(--heading-color)
   =========================================== */
.st-style-elementor .top-filter .dropdown-menu .taxonomy-enhanced .group-title,
.taxonomy-enhanced .group-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 26px;
    color: var(--heading-color, #191970);
    margin: 0 0 10px;
    display: block;
}

.st-style-elementor .top-filter .dropdown-menu .taxonomy-enhanced .group-desc,
.taxonomy-enhanced .group-desc {
    display: block;
    font-size: 12px;
    color: var(--grey-color, #5E6D77);
    font-style: italic;
    margin-top: 2px;
}

/* ===========================================
   INTRO TEXT
   =========================================== */
.st-style-elementor .top-filter .dropdown-menu .taxonomy-enhanced .filter-intro-text,
.taxonomy-enhanced .filter-intro-text {
    padding: 0 0 12px;
    margin-bottom: 12px;
    color: var(--grey-color, #5E6D77);
    font-size: 13px;
    line-height: 1.4;
    border-bottom: 1px solid #e8ecf0;
}

/* ===========================================
   GROUP STRUCTURE
   =========================================== */
.taxonomy-enhanced .filter-group {
    margin: 0;
    padding: 0;
}

.taxonomy-enhanced .filter-group + .filter-group {
    border-top: 1px solid #e8ecf0;
    margin-top: 15px;
    padding-top: 15px;
}

.taxonomy-enhanced .filter-group-header {
    padding: 0 0 8px;
}

.taxonomy-enhanced .filter-group-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ===========================================
   TERM ITEM - Override parent's padding-left: 32px
   =========================================== */
.st-style-elementor .top-filter .dropdown-menu .taxonomy-enhanced .st-icheck-item,
.st-style-elementor .top-filter .taxonomy-enhanced .st-icheck-item,
.taxonomy-enhanced .st-icheck-item.filter-term-item {
    padding-left: 0;
    margin: 0;
}

.taxonomy-enhanced .filter-term-item > label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.taxonomy-enhanced .filter-term-item > label:hover {
    background: #f4f7fa;
}

/* ===========================================
   CHECKBOX
   =========================================== */
.taxonomy-enhanced .filter-term-item .checkmark.fcheckbox {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 1.5px solid #bfc9d4;
    border-radius: 4px;
    background: #fff;
}

.taxonomy-enhanced .filter-term-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 16px;
    height: 16px;
}

.taxonomy-enhanced .filter-term-item input:checked + .checkmark.fcheckbox {
    background: #ee7f23;
    border-color: #ee7f23;
}

.taxonomy-enhanced .filter-term-item input:checked + .checkmark.fcheckbox::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin: 1px auto 0;
}

.taxonomy-enhanced .filter-term-item label:hover .checkmark.fcheckbox {
    border-color: #ee7f23;
}

/* ===========================================
   TERM CONTENT
   =========================================== */
.taxonomy-enhanced .term-content {
    flex: 1;
    min-width: 0;
}

.taxonomy-enhanced .term-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.taxonomy-enhanced .term-name {
    font-size: 16px;
    font-weight: 400;
    color: var(--grey-color, #5E6D77);
    line-height: 26px;
}

.taxonomy-enhanced .term-count {
    flex-shrink: 0;
    min-width: 20px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 500;
    color: #7a8a9a;
    background: #f0f3f6;
    border-radius: 8px;
    text-align: center;
}

.taxonomy-enhanced .term-helper {
    margin-top: 2px;
    font-size: 12px;
    color: var(--grey-color, #5E6D77);
    line-height: 1.3;
}

/* ===========================================
   SIDEBAR VARIANT
   =========================================== */
.sidebar-item.taxonomy-enhanced {
    padding: 0;
}

.sidebar-item.taxonomy-enhanced .item-content {
    padding: 15px;
}

.sidebar-item.taxonomy-enhanced .filter-intro-text {
    padding: 0 0 10px;
    margin-bottom: 10px;
}

.sidebar-item.taxonomy-enhanced .filter-group-header {
    padding: 0 0 6px;
}

.sidebar-item.taxonomy-enhanced .filter-term-item > label {
    padding: 6px 4px;
}

.sidebar-item.taxonomy-enhanced .btn-more-item {
    display: none;
}

/* ===========================================
   BUDGET FILTER - Subtitle under "Budget" title
   Reuses .filter-intro-text pattern from taxonomy groups
   =========================================== */
.filter-price .filter-intro-text {
    padding: 0 0 12px;
    margin-bottom: 8px;
    color: var(--grey-color, #5E6D77);
    font-size: 13px;
    line-height: 1.4;
    border-bottom: 1px solid #e8ecf0;
}

/* ===========================================
   BUDGET FILTER - Single slider (left handle locked)
   Hide left handle and FROM tooltip since min is fixed
   =========================================== */
.budget-filter .irs-handle.from,
.budget-filter .irs-from {
    display: none !important;
}

.budget-filter .irs-bar--single {
    border-radius: 4px 0 0 4px;
}

/* ===========================================
   MOBILE - Match parent theme behavior
   Parent keeps same font sizes on mobile (16px titles, 16px items)
   Only adjust touch target spacing
   =========================================== */
@media (max-width: 768px) {
    .taxonomy-enhanced .filter-term-item > label {
        padding: 10px 6px;
    }
}
