/* === Fund Search Sidebar (Mirroring .side-menu) === */
.fund-sidebar {
    pointer-events: auto;
    position: absolute;
    right: 30px !important;
    top: 30px;
    /* Matched .side-menu style.css */
    bottom: 100px;
    width: 440px;

    /* Using shared liquid-glass styling predominantly */
    border-radius: 32px;
    z-index: 900;

    /* Animation */
    transform: translateX(calc(100% + 40px)) scale(0.9);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* UNIFORM SPACING FOR FILTER GROUPS */
.filter-base-spacing {
    margin-bottom: 40px;
    position: relative;
}

.filter-section-spacing {
    margin-bottom: 40px;
    position: relative;
}

.filter-large-spacing {
    margin-bottom: 15px;
    position: relative;
}

.filter-group {
    margin-bottom: 30px;
    /* Standardized spacing */
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Dark Divider */
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.fund-sidebar.active {
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* Mobile Filter Sidebar Update */
@media (max-width: 768px) {
    .fund-sidebar {
        width: 100%;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0 !important;
        border-radius: 0;
        transform: translateY(100%);
    }

    .fund-sidebar.active {
        transform: translateY(0);
    }

    .close-sidebar-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.2);
    }

    /* Landscape Mobile */
    @media (max-height: 500px) and (orientation: landscape) {
        .fund-sidebar {
            width: 300px;
            left: auto;
            right: 10px !important;
            top: 10px;
            bottom: auto;
            height: calc(100% - 20px);
            transform: translateX(110%);
            /* Slide out right */
            border-radius: 24px;
        }

        .fund-sidebar.active {
            transform: translateX(0);
        }

    }
}

/* Floating Toggle Button (Visible when sidebar is hidden) */

.sidebar-toggle-btn:hover {
    transform: scale(1.1);
    background: #fff;
    color: #a59671;
}

/* Header */
.sidebar-header {
    padding: 20px 24px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Dark mode border */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    /* White text */
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-sidebar-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.close-sidebar-btn span {
    color: white;
    /* Ensure icon is white */
}

.close-sidebar-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* Search */
/* Search */
.search-box-wrapper {
    padding: 15px 30px 10px 30px;
    position: relative;
    /* Context for suggestions */
}

.search-input-inner {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    /* Glass Dark */
    border-radius: 50px;
    padding: 8px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.search-input-inner:focus-within {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    border-color: rgba(208, 189, 149, 0.5);
    /* Gold tint */
}

.search-input-inner i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    margin-right: 10px;
}

.search-input-inner input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: white;
    /* White text */
    padding: 0;
}

.suggestions-dropdown {
    position: absolute;
    top: calc(100% - 5px);
    /* Just slightly overlapping wrapper padding area */
    left: 30px;
    /* Match wrapper padding */
    right: 30px;
    /* Match wrapper padding */
    width: auto;
    /* Use left/right */
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    margin-top: 10px;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    padding: 8px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-dropdown-list {
    /* Style for the fixed positioned list */
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Match header border */
    box-sizing: border-box;
    /* Ensure padding doesn't add to width */
    max-width: 100%;
    /* Prevent overflow */
}

/* Filters */
.filters-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.filters-container::-webkit-scrollbar {
    width: 4px;
}

.filters-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #86868b;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Tags */
.tags-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    transition: 0.2s;
}

.filter-tag.active {
    background: #1d1d1f;
    /* Dark for active tag to match clean style? Or Green? User liked Green logic. sticking to green for status */
    background: #2ecc71;
    color: white;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
    border-color: transparent;
}

/* Sliders */
.range-slider-container {
    position: relative;
    height: 40px;
    margin-bottom: 5px;
}

.range-slider-container input[type=range] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
    background: none;
    height: 4px;
    /* Ensure height for track alignment */
    margin-top: 18px;
    /* Center with thumb */
}

/* Slider Track */
.range-slider-container input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    z-index: 1;
}

.range-slider-container input[type=range]::-webkit-slider-thumb {
    pointer-events: all;
    width: 32px;
    height: 32px;
    -webkit-appearance: none;
    appearance: none;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    margin-top: -14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Product List Table Styles */
.product-list-table {
    width: 100%;
    border-collapse: collapse;
    /* Ensure borders are shared */
    font-size: 15px;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Outer border */
}

.product-list-table th,
.product-list-table td {
    padding: 14px 16px;
    /* Comfortable padding */
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Grid lines */
}

.product-list-table th {
    background: transparent !important;
    /* Transparent header */
    color: white;
    font-weight: 700;
    font-size: 15px;
    opacity: 1 !important;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.product-list-table th:hover {
    background: #c3b089;
}

.product-list-table th i {
    margin-left: 5px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.product-list-table tbody tr:nth-child(even) {
    background-color: #1a1a1c;
    /* Zebra striping - dark even */
    color: #e0e0e0;
}

.product-list-table tbody tr:nth-child(odd) {
    background-color: #222224;
    /* Zebra striping - dark odd */
    color: #e0e0e0;
}

.product-list-table tbody tr:hover {
    background-color: #2a2a2d;
    /* Hover highlight */
}

/* Active Row */
.product-list-table tbody tr.active-row {
    background-color: #d0bd95 !important;
}

.product-list-table tbody tr.active-row td {
    color: white !important;
}

.product-list-table tbody tr.active-row .btn-view-detail {
    background: #0A84FF;
    color: #ffffff;
}

.product-list-table .btn-view-detail {
    padding: 6px 14px;
    background: #0A84FF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    background: 0.2s;
    white-space: nowrap;
}

.product-list-table .btn-view-detail:hover {
    background: #ad9a6a;
    transform: scale(1.05);
}

/* Custom Dropdown (Glass) */
.custom-dropdown-wrapper {
    position: relative;
    width: 100%;
}

.custom-dropdown-header {
    width: 100%;
    padding: 10px 16px;
    /* Match Search Input Inner padding vertical logic */
    background: white;
    /* Clean white */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Match Search Input */
    border-radius: 50px;
    /* PILL SHAPE to match Search */
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: #1d1d1f;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Match Search Shadow */
    box-sizing: border-box;
}

.custom-dropdown-header:hover {
    background: #fff;
    border-color: #2ecc71;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.custom-dropdown-header::after {
    content: '\ea4e';
    /* Chevron down from remixicon */
    font-family: 'remixicon';
    font-size: 16px;
    color: #888;
    transition: 0.3s;
}

.custom-dropdown-wrapper.active .custom-dropdown-header::after {
    transform: rotate(180deg);
}

.custom-dropdown-list {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    padding: 30px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.green {
    background-color: #2ecc71;
}

.status-dot.red {
    background-color: #e74c3c;
}

.custom-dropdown-list.active {
    display: block;
}

.custom-option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
}

.custom-option:hover {
    background: #f0f0f2;
}

.custom-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2ecc71;
    cursor: pointer;
}

.price-inputs {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

/* Footer */
/* Footer */
/* Footer */
/* Footer */
.sidebar-footer {
    padding: 20px 30px !important;
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    /* Stack rows */
    gap: 15px;
    margin-top: auto;
    flex-shrink: 0;
}

.btn-reset {
    flex: 1;
    /* Match width */
    padding: 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    transition: 0.2s;
    text-align: center;
}

/* Specific styles assuming first button is View List, second is Reset */
/* Specific styles for Footer Buttons */

/* View List Button (Primary) */
/* View List Button (Primary) */
.sidebar-footer .btn-primary-action {
    width: 100%;
    /* Full width in column layout */
    background: #d0bd95;
    /* Gold/Primary color logic */
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(208, 189, 149, 0.3);
    display: flex;
    /* Ensure flex behavior */
    align-items: center;
    justify-content: center;
    /* Center content */
    gap: 8px;
    transition: all 0.3s;
    font-size: 15px;
    text-transform: uppercase;
}

.sidebar-footer .btn-primary-action:hover {
    background: #e5d1a8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208, 189, 149, 0.4);
}

.sidebar-footer .btn-primary-action span {
    color: white;
}

/* Reset Button (Link style) */
.sidebar-footer button[onclick*="resetFundFilters"] {
    color: rgba(255, 255, 255, 0.5);
    /* Muted white */
    transition: 0.3s;
}

.sidebar-footer button[onclick*="resetFundFilters"]:hover {
    color: white;
    text-decoration: underline;
}

/* Match Code container style if needed */
.match-code-container {
    width: 100%;
    /* Or auto */
}

/* Suggestions */
/* Search Suggestions */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(15, 18, 24, 0.827);
    /* Dark background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-top: 5px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    padding: 5px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestions-dropdown.active {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    /* Center vertical */
    gap: 12px;
    /* Gap between thumb and text */
}

.suggestion-thumb {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

/* Wrapper for text to stack vertically */
.suggestion-info {
    display: flex;
    flex-direction: column;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggestion-item .code {
    font-weight: 700;
    color: white;
}

.suggestion-item .meta {
    font-size: 15px;
    /* Smaller meta */
    color: rgba(255, 255, 255, 0.5);
}

.water-slider-container {
    position: relative;
    height: 50px;
    /* Ensure height for absolute children */
    width: 100%;
    margin-top: 10px;
}

/* === SLIDER ENHANCEMENTS === */
.water-droplet-thumb {
    position: absolute;
    top: 50%;
    width: 28px;
    /* Larger visual thumb */
    height: 28px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Increase touch target for interactions */
.water-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    /* Large touch target */
    height: 44px;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    z-index: 20;
    border-radius: 50%;
}

.water-range-input::-moz-range-thumb {
    width: 44px;
    height: 44px;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    border-radius: 50%;
}

/* Ensure water track highlight is visible */
.water-track-highlight {
    background: var(--primary-color, #d0bd95);
    height: 4px;
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    z-index: 5;
}

/* Mobile Optimization */
/* Mobile Optimization */
@media (max-width: 768px) {
    .fund-sidebar {
        /* Portrait: Bottom Sheet Style -> Changed to Full Panel to cover top buttons */
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0 !important;
        transform: translateY(20px);
        /* Start slightly down */
        top: 30px;
        bottom: 90px;
        /* Above bottom menu */
        height: calc(100% - 120px);
        /* 100% - top(30px) - bottom(90px) */
        border-radius: 24px 24px 0 0;
        opacity: 0;
        pointer-events: none;
        background: rgba(15, 18, 24, 0.95) !important;
        /* Force dark background */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 100000 !important;
    }

    .fund-sidebar.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* FORCE TEXT WHITE */
    .fund-sidebar h3,
    .fund-sidebar label,
    .fund-sidebar span,
    .fund-sidebar div,
    .fund-sidebar p,
    .fund-sidebar .filter-tag {
        color: rgba(255, 255, 255, 0.95) !important;
    }

    .fund-sidebar .sidebar-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Ensure Inputs are visible */
    .fund-sidebar input[type="text"],
    .fund-sidebar input[type="number"] {
        color: white !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .sidebar-toggle-btn {
        right: 16px;
        /* Align with VR controls center */
        top: 120px;
        /* Below Top buttons */
        width: 36px;
        height: 36px;
        font-size: 18px
    }

    /* TABLE COMPACTING */
    .product-list-table th,
    .product-list-table td {
        padding: 10px 8px;
        /* Compact padding */
        font-size: 15px
            /* Smaller font */
    }

    .product-list-table .btn-view-detail {
        padding: 4px 10px;
        font-size: 15px
    }

    /* FILTERS & SLIDERS */
    .filters-container {
        padding: 15px;
        /* Less padding */
    }

    .range-slider-container {
        height: 50px;
        /* Larger Touch Area */
    }

    .range-slider-container input[type=range]::-webkit-slider-thumb {
        width: 40px;
        /* Larger Thumb thumb */
        height: 40px;
        margin-top: -18px;
    }
}

/* Landscape Mobile - FIXED SIDEBAR */
@media (max-height: 500px) and (orientation: landscape) {
    .fund-sidebar {
        width: 300px;
        /* Fixed width, not percentage */
        right: 60px;
        /* Clear of controls */
        top: 10px;
        bottom: 10px;
        max-width: unset;
        transform: translateX(120%);
    }

    .fund-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle-btn {
        right: 50px;
        /* Tucked in */
        top: 15px;
        /* Top align */
        width: 32px;
        height: 32px;
        font-size: 16px
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .fund-sidebar {
        width: 45%;
        right: 60px;
        /* Clear vertical controls */
        top: 10px;
        bottom: 10px;
    }

    .sidebar-toggle-btn {
        right: 60px;
        top: 10px;
    }
}