/* Search Drawer Styles */
.search-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 10000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.search-drawer.active {
    right: 0;
}

.search-drawer-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.search-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Alterado para flex-start */
    padding: 25px 20px 15px; /* Mais padding no topo */
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    min-height: 80px; /* Altura mínima aumentada */
}

.search-drawer-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
    margin-top: 5px; /* Espaço no topo do título */
}

.search-drawer-close {
    background: none;
    border: none;
    font-size: 2em; /* Tamanho aumentado */
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 5px; /* Padding aumentado */
    width: 40px; /* Largura aumentada */
    height: 40px; /* Altura aumentada */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%; /* Formato circular */
    margin-top: -5px; /* Ajuste de posição */
}

.search-drawer-close:hover {
    color: #333;
    background: rgba(0,0,0,0.1); /* Fundo no hover */
}

.search-form-drawer {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px; /* Espaço entre elementos */
}

/* Campo de busca agora em cima */
.search-input-group {
    display: flex;
    border: 2px solid #0b5394;
    border-radius: 6px;
    overflow: hidden;
    order: -1; /* Força ficar em cima */
}

.search-input-group input {
    flex: 1;
    padding: 14px 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: white;
}

.search-input-group button {
    background: #0b5394;
    border: none;
    color: white;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.search-input-group button:hover {
    background: #083c6b;
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.filter-group {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: bold;
    color: #333;
    font-size: 15px;
}

/* CHECKBOX STYLES (Substitui o radio) */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    padding: 10px 0;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    padding-left: 5px;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #0b5394;
    background: #0b5394;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

#regionSelect {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    margin-top: 5px;
    transition: border-color 0.3s ease;
}

#regionSelect:focus {
    border-color: #0b5394;
    outline: none;
}

#regionSelect optgroup {
    font-weight: bold;
    color: #333;
    padding: 5px 0;
}

#regionSelect option {
    padding: 8px 12px;
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

.menu-overlay.active {
    display: block;
}

/* Body lock when drawer is open */
body.drawer-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 480px) {
    .search-drawer {
        max-width: 100%;
    }
    
    .search-drawer-header {
        padding: 20px 15px 12px;
        min-height: 70px;
    }
    
    .search-form-drawer {
        padding: 15px;
        gap: 20px;
    }
    
    .search-drawer-header h3 {
        font-size: 1.2em;
    }
    
    .search-drawer-close {
        font-size: 1.8em;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .search-drawer {
        max-width: 350px;
    }
}

@media (min-width: 1024px) {
    .search-drawer-header {
        padding: 30px 20px 20px; /* Mais espaço no desktop */
        min-height: 90px;
    }
    
    .search-drawer-close {
        margin-top: 0; /* Ajuste para desktop */
    }
}