/* ======================================================
   Search Box Modern — Rounded, Minimalist, Transparent
   ====================================================== */

.search-box-modern {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 60px;
    padding: 6px 6px 6px 24px;
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.search-box-modern:hover,
.search-box-modern:focus-within,
.search-box-modern.sbm-active {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.search-box-modern__fields {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.search-box-modern__field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-box-modern__field--check {
    flex: 0 0 auto;
    padding: 0 12px;
}

.search-box-modern__divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: background 0.4s;
}

.search-box-modern:hover .search-box-modern__divider,
.search-box-modern:focus-within .search-box-modern__divider,
.search-box-modern.sbm-active .search-box-modern__divider {
    background: #e2e8f0;
}

/* Trigger button */
/* Trigger button — transparent state: white text */
.sbm-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    transition: background 0.15s, color 0.4s;
    border-radius: 30px;
}

.search-box-modern:hover .sbm-dropdown__trigger,
.search-box-modern:focus-within .sbm-dropdown__trigger,
.search-box-modern.sbm-active .sbm-dropdown__trigger {
    color: #1e293b;
}

.sbm-dropdown__trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-box-modern:hover .sbm-dropdown__trigger:hover,
.search-box-modern:focus-within .sbm-dropdown__trigger:hover,
.search-box-modern.sbm-active .sbm-dropdown__trigger:hover {
    background: rgba(0, 0, 0, 0.04);
}

.sbm-dropdown__trigger > i:first-child {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
    transition: color 0.4s;
}

.search-box-modern:hover .sbm-dropdown__trigger > i:first-child,
.search-box-modern:focus-within .sbm-dropdown__trigger > i:first-child,
.search-box-modern.sbm-active .sbm-dropdown__trigger > i:first-child {
    color: #64748b;
}

.sbm-dropdown__arrow {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.4s;
}

.search-box-modern:hover .sbm-dropdown__arrow,
.search-box-modern:focus-within .sbm-dropdown__arrow,
.search-box-modern.sbm-active .sbm-dropdown__arrow {
    color: #94a3b8;
}

.sbm-dropdown.open .sbm-dropdown__arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.sbm-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    animation: sbmFadeIn 0.15s ease;
}

.sbm-dropdown.open .sbm-dropdown__menu {
    display: block;
}

@keyframes sbmFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.sbm-dropdown__menu--wide {
    min-width: 420px;
    left: 50%;
    transform: translateX(-50%);
}

.sbm-dropdown.open .sbm-dropdown__menu--wide {
    display: block;
    transform: translateX(-50%);
}

/* Search inside dropdown */
.sbm-dropdown__search-wrap {
    padding: 10px 12px 6px;
}

.sbm-dropdown__search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #334155;
    outline: none;
    transition: border-color 0.15s;
}

.sbm-dropdown__search:focus {
    border-color: #3b82f6;
}

/* Dropdown list */
.sbm-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 240px;
    overflow-y: auto;
}

.sbm-dropdown__list li {
    margin: 0;
}

.sbm-dropdown__list li a {
    display: block;
    padding: 9px 14px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.1s;
}

.sbm-dropdown__list li a:hover,
.sbm-dropdown__list li a.active {
    background: #f1f5f9;
    color: #0f172a;
}

.sbm-dropdown__list li a.active {
    font-weight: 600;
}

.sbm-dropdown__placeholder {
    padding: 20px 14px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* Cascade (state → city) */
.sbm-cascade {
    display: flex;
}

.sbm-cascade__col {
    flex: 1;
    min-width: 0;
    border-right: 1px solid #f1f5f9;
}

.sbm-cascade__col:last-child {
    border-right: none;
}

/* Checkbox */
.sbm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    margin: 0;
    padding: 10px 6px;
    border-radius: 30px;
    transition: background 0.15s, color 0.4s;
}

.search-box-modern:hover .sbm-checkbox,
.search-box-modern:focus-within .sbm-checkbox,
.search-box-modern.sbm-active .sbm-checkbox {
    color: #475569;
}

.sbm-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-box-modern:hover .sbm-checkbox:hover,
.search-box-modern:focus-within .sbm-checkbox:hover,
.search-box-modern.sbm-active .sbm-checkbox:hover {
    background: rgba(0, 0, 0, 0.04);
}

.sbm-checkbox input {
    display: none;
}

.sbm-checkbox__box {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s, border-color 0.4s;
    flex-shrink: 0;
}

.search-box-modern:hover .sbm-checkbox__box,
.search-box-modern:focus-within .sbm-checkbox__box,
.search-box-modern.sbm-active .sbm-checkbox__box {
    border-color: #cbd5e1;
}

.sbm-checkbox input:checked + .sbm-checkbox__box {
    background: #1e293b;
    border-color: #1e293b;
}

.sbm-checkbox input:checked + .sbm-checkbox__box::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* Search button */
.search-box-modern__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.4s, border-color 0.4s, color 0.4s, transform 0.1s;
    flex-shrink: 0;
}

.search-box-modern:hover .search-box-modern__btn,
.search-box-modern:focus-within .search-box-modern__btn,
.search-box-modern.sbm-active .search-box-modern__btn {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

.search-box-modern__btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.search-box-modern:hover .search-box-modern__btn:hover,
.search-box-modern:focus-within .search-box-modern__btn:hover,
.search-box-modern.sbm-active .search-box-modern__btn:hover {
    background: #0f172a;
    border-color: #0f172a;
}

.search-box-modern__btn:active {
    transform: scale(0.97);
}

.search-box-modern__btn i {
    font-size: 14px;
}

/* Scrollbar */
.sbm-dropdown__list::-webkit-scrollbar {
    width: 4px;
}

.sbm-dropdown__list::-webkit-scrollbar-track {
    background: transparent;
}

.sbm-dropdown__list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ======================================================
   Properties List Page — Filter Bar Redesign
   ====================================================== */

.search-box-filters-modern {
    background: #fff;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.search-box-filters-modern .filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box-filters-modern .filter-item {
    flex: 1;
    min-width: 140px;
    position: relative;
}

.search-box-filters-modern .filter-item--btn {
    flex: 0 0 auto;
    min-width: auto;
}

.search-box-filters-modern .filter-item label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.search-box-filters-modern .form-control,
.search-box-filters-modern .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
    height: auto;
}

.search-box-filters-modern .form-control:focus,
.search-box-filters-modern .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.search-box-filters-modern .btn-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.search-box-filters-modern .btn-search:hover {
    background: #0f172a;
}

.search-box-filters-modern .btn-reset {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.search-box-filters-modern .btn-reset:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-box-modern {
        flex-direction: column;
        border-radius: 20px;
        padding: 16px;
        gap: 8px;
    }

    .search-box-modern__fields {
        flex-direction: column;
        width: 100%;
    }

    .search-box-modern__field {
        width: 100%;
    }

    .search-box-modern__divider {
        width: 100%;
        height: 1px;
    }

    .search-box-modern__btn {
        width: 100%;
        justify-content: center;
        border-radius: 14px;
    }

    .sbm-dropdown__trigger {
        border-radius: 14px;
    }

    .sbm-dropdown__menu,
    .sbm-dropdown__menu--wide {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0 !important;
        right: 0;
        min-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 60vh;
        transform: none !important;
    }

    .sbm-cascade {
        flex-direction: column;
    }

    .sbm-cascade__col {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .search-box-filters-modern .filters-row {
        flex-direction: column;
    }

    .search-box-filters-modern .filter-item {
        width: 100%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .search-box-modern {
        max-width: 100%;
        margin: 0 20px;
    }
}
