/* Correções para a página de Imóveis */

/* 1. Z-INDEX: Garantir que dropdowns apareçam sobre o botão Pesquisar */
.property-sidebar-area .form-select {
    position: relative;
    z-index: 10;
}

.property-sidebar-area .form-select:focus {
    z-index: 20;
}

/* Garantir que o dropdown aberto fique acima de tudo */
.property-sidebar-area .form-select option {
    z-index: 100;
}

/* 2. BOTÃO PESQUISAR: Mesmas cores do header */
.property-sidebar-area .btn-success {
    background: #073B3A !important;
    border-color: #073B3A !important;
    color: #fff !important;
    transition: all 0.3s ease;
}

.property-sidebar-area .btn-success:hover {
    background: #052a29 !important;
    border-color: #052a29 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(7, 59, 58, 0.2);
}

.property-sidebar-area .btn-success:active,
.property-sidebar-area .btn-success:focus {
    background: #052a29 !important;
    border-color: #052a29 !important;
    box-shadow: none !important;
}

/* 3. SETA DUPLA: Remover seta padrão e garantir apenas uma seta customizada */
.property-sidebar-area .form-select {
    /* Remove seta padrão do browser */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    
    /* Adiciona seta customizada */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8.825L1.175 4 2.55 2.625 6 6.075 9.45 2.625 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px !important;
}

/* Garantir que não haja duplicação de setas em estados hover/focus */
.property-sidebar-area .form-select:hover,
.property-sidebar-area .form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23073B3A' d='M6 8.825L1.175 4 2.55 2.625 6 6.075 9.45 2.625 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Remover qualquer pseudo-elemento que possa estar criando setas extras */
.property-sidebar-area .form-select::before,
.property-sidebar-area .form-select::after {
    content: none !important;
    display: none !important;
}

/* Estilização adicional dos selects para melhor aparência */
.property-sidebar-area .form-select {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 40px 12px 14px;
    font-size: 15px;
    line-height: 1.2;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    vertical-align: middle;
}

/* Garantir que os labels e selects tenham alinhamento consistente */
.property-sidebar-area .form-group {
    margin-bottom: 1rem;
}

.property-sidebar-area .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Garantir largura consistente para todos os elementos do formulário */
.property-sidebar-area .form-select,
.property-sidebar-area .form-control {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Correções específicas para página de Busca - espaçamento do botão */
.property-sidebar-area hr.my-3 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.property-sidebar-area .form-group:has(button) {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
}

/* Fallback para browsers que não suportam :has() */
.property-sidebar-area .form-group:last-child {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
}

/* Correção para alinhamento de altura entre card e grid de imóveis */
.property-grid-section-area .container .row {
    align-items: flex-start !important;
}

/* Remover espaçamentos que empurram os imóveis para baixo e subir mais */
.property-grid-section-area .col-lg-9 {
    padding-top: 0 !important;
    margin-top: -20px !important;
}

.property-grid-area {
    margin-top: -10px !important;
    padding-top: 0 !important;
}

/* Remover espaçamentos do container de filtros no topo */
.property-filter-area {
    margin-top: -15px !important;
    margin-bottom: 1rem !important;
    padding-top: 0 !important;
}

/* Garantir que o card tenha altura mínima para alinhamento */
.property-sidebar-area .card {
    min-height: 400px;
    align-self: flex-start;
}

/* Alinhar o início dos imóveis com o topo do card */
.property-grid-section-area .row:first-of-type {
    margin-top: 0 !important;
}

.property-sidebar-area .form-select:focus {
    border-color: #073B3A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(7, 59, 58, 0.1);
}

/* Garantir que o container do sidebar tenha z-index adequado */
.property-sidebar-area {
    position: relative;
    z-index: 5;
}

/* Fix para possíveis conflitos com nice-select se estiver sendo usado */
.property-sidebar-area .nice-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.property-sidebar-area .nice-select::after {
    content: none !important;
}

/* Adicionar estilo consistente para todos os form controls */
.property-sidebar-area .form-control {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.property-sidebar-area .form-control:focus {
    border-color: #073B3A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(7, 59, 58, 0.1);
}

/* Melhorar espaçamento do card */
.property-sidebar-area .card-body {
    padding: 24px;
}

/* Garantir que o dropdown de ordenação também funcione corretamente */
.property-sort select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8.825L1.175 4 2.55 2.625 6 6.075 9.45 2.625 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px !important;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 40px 10px 14px;
}

/* Proteger elementos de paginação de serem convertidos por plugins */
.pagination a {
    pointer-events: auto !important;
}

.pagination .page-link {
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Prevenir nice-select de afetar elementos de paginação */
.pagination-area * {
    pointer-events: auto !important;
}