/* Mobile Off-Canvas Filter Styles */
@media (max-width: 768px) {
    /* Overlay */
    .mobile-filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-filter-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Sidebar */
    .mobile-filter-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        height: 100dvh;
        background-color: #fff;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        transition: right 0.3s ease;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    }

    .search-options-mobile.active .mobile-filter-sidebar {
        right: 0;
    }

    /* Header */
    .mobile-filter-header {
        background-color: #006fb5;
        color: #fff;
        padding: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }

    .mobile-filter-header h3 {
        margin: 0;
        font-size: 20px;
        font-family: 'Inter-SemiBold', sans-serif;
        letter-spacing: 1px;
        color: #fff !important;
    }

    .mobile-filter-header .close-filter {
        background: none;
        border: none;
        color: #fff;
        font-size: 32px;
        line-height: 1;
        cursor: pointer;
        padding: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Content */
    .mobile-filter-content {
        flex: 1;
        overflow-y: auto;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    /* Filter Group */
    .filter-group {
        border-bottom: 1px solid #e0e0e0;
    }

    .filter-group:last-of-type {
        border-bottom: none;
    }

    /* Código do Imóvel Group */
    .filter-group-codigo {
        padding: 20px;
        border-bottom: none;
    }

    .filter-input-label-codigo {
        margin-bottom: 0;
    }

    /* Accordion Button */
    .filter-accordion {
        width: 100%;
        background-color: #fff;
        border: none;
        padding: 18px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        font-family: 'Inter-SemiBold', sans-serif;
        font-size: 14px;
        letter-spacing: 0.5px;
        color: #006fb5;
        text-align: left;
        transition: background-color 0.2s ease;
    }

    .filter-accordion:active {
        background-color: #f5f5f5;
    }

    .filter-accordion svg {
        transition: transform 0.3s ease;
        stroke: #006fb5;
    }

    .filter-accordion.active svg {
        transform: rotate(180deg);
    }

    /* Filter Panel */
    .filter-panel {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: #fafafa;
    }

    .filter-panel.active {
        max-height: 600px;
        overflow-y: auto;
    }

    .filter-options {
        padding: 15px 20px;
    }

    .filter-checkboxes {
        padding: 15px 20px;
    }

    /* Checkbox Wrapper */
    .filter-checkbox-wrapper {
        display: flex;
        align-items: center;
        margin-bottom: 14px;
        padding: 4px 0;
    }

    .filter-checkbox-wrapper:last-child {
        margin-bottom: 0;
    }

    .filter-checkbox-wrapper input[type="checkbox"],
    .filter-checkbox-wrapper input[type="radio"] {
        width: 20px;
        height: 20px;
        margin: 0;
        margin-right: 12px;
        cursor: pointer;
        accent-color: #006fb5;
    }

    .filter-checkbox-wrapper label {
        margin: 0;
        cursor: pointer;
        font-size: 15px;
        color: #333;
        flex: 1;
        font-family: 'Inter', sans-serif;
    }

    /* Input Labels */
    .filter-input-label {
        display: block;
        margin-bottom: 16px;
        font-family: 'Inter-SemiBold', sans-serif;
        font-size: 13px;
        color: #006fb5;
        letter-spacing: 0.3px;
    }

    .filter-input-label:last-child {
        margin-bottom: 0;
    }

    .filter-input {
        width: 100%;
        padding: 12px 14px;
        margin-top: 8px;
        border: 1px solid #d0d0d0;
        border-radius: 6px;
        font-size: 15px;
        font-family: 'Inter', sans-serif;
        color: #333;
        background-color: #fff;
        transition: border-color 0.2s ease;
    }

    .filter-input:focus {
        outline: none;
        border-color: #006fb5;
        box-shadow: 0 0 0 3px rgba(0, 111, 181, 0.1);
    }

    .filter-input::placeholder {
        color: #999;
    }

    /* Footer */
    .mobile-filter-footer {
        background-color: #fff;
        padding: 20px;
        border-top: 1px solid #e0e0e0;
        display: flex;
        gap: 12px;
        flex-shrink: 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    }

    .btn-clear-filters {
        flex: 1;
        padding: 16px 20px;
        background-color: #fff;
        border: 2px solid #006fb5;
        border-radius: 8px;
        color: #006fb5;
        font-family: 'Inter-SemiBold', sans-serif;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.3px;
        cursor: pointer;
        transition: all 0.2s ease;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-clear-filters:active {
        background-color: #f0f7fc;
        transform: scale(0.98);
    }

    .btn-apply-filters {
        flex: 1;
        padding: 16px 20px;
        background-color: #006fb5;
        border: 2px solid #006fb5;
        border-radius: 8px;
        color: #fff;
        font-family: 'Inter-SemiBold', sans-serif;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.3px;
        cursor: pointer;
        transition: all 0.2s ease;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-apply-filters:active {
        background-color: #005a94;
        border-color: #005a94;
        transform: scale(0.98);
    }

    /* Aplicar estilos aos elementos populados dinamicamente */
    .wrapper-cidade,
    .wrapper-bairro,
    .wrapper-tipo,
    .wrapper-dormitorios,
    .wrapper-suites,
    .wrapper-vagas {
        display: flex;
        align-items: center;
        margin-bottom: 14px;
        padding: 4px 0;
    }

    .wrapper-cidade:last-child,
    .wrapper-bairro:last-child,
    .wrapper-tipo:last-child,
    .wrapper-dormitorios:last-child,
    .wrapper-suites:last-child,
    .wrapper-vagas:last-child {
        margin-bottom: 0;
    }

    .wrapper-cidade input[type="radio"],
    .wrapper-cidade input[type="checkbox"],
    .wrapper-bairro input[type="checkbox"],
    .wrapper-tipo input[type="checkbox"],
    .wrapper-dormitorios input[type="checkbox"],
    .wrapper-suites input[type="checkbox"],
    .wrapper-vagas input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin: 0;
        margin-right: 12px;
        cursor: pointer;
        accent-color: #006fb5;
    }

    .wrapper-cidade label,
    .wrapper-bairro label,
    .wrapper-tipo label,
    .wrapper-dormitorios label,
    .wrapper-suites label,
    .wrapper-vagas label {
        margin: 0;
        cursor: pointer;
        font-size: 15px;
        color: #333;
        flex: 1;
        font-family: 'Inter', sans-serif;
    }

    /* Esconder wrapper-radio e wrapper-checkbox padrão no mobile */
    #cidades-mobile .wrapper-radio,
    #lista-bairros-mobile .wrapper-checkbox,
    #lista-tipo-mobile .wrapper-radio {
        display: flex;
        align-items: center;
        margin-bottom: 14px;
        padding: 4px 0;
    }
}
