/* Arquivo: styles.css */

/* Botão de Fechar no Topo Esquerdo */
.close-premium {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4d4d;
    color: white;
    border: none;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.close-loginpopup {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4d4d;
    color: white;
    border: none;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}
.close-premium:hover {
    background: #cc0000;
}

.close-loginpopup:hover {
    background: #cc0000;
}

.report-error-button {
    display: block;
    text-align: right; /* Aligns the button to the right */
    font-size: 8px; /* Reduces the font size */
    color: red; /* Optional: Keeps it visually distinct */
    text-decoration: none;
    margin-top: 1px;
}

/* Prevent the map from blocking new content */
#map {
    z-index: 500; /* Lower than the premium page */
    position: relative;
}

/* Ensure the Premium Page is always on top */
.premium-page {
    position: absolute;
    top: 50px; /* Adjust based on header/menu height */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000; /* Ensures it appears above the map */
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.loginpopup-page {
    position: absolute;
    top: 50px; /* Adjust based on header/menu height */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000; /* Ensures it appears above the map */
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

body {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #f5f5f5;
    overflow: hidden; /* Evita barras de rolagem desnecessárias */
    line-height: 1.6;
    color: #333;
}

#top-bar {
    width: 100%;
    height: 30px;
    background-color: #003366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    font-size: 0.9em;
}
.top-bar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    right: 30px; /* fixa na direita */
    top: 0;
    height: 100%;
}


#top-bar .logo {
    display: flex;
    align-items: center;
}

#top-bar .logo img {
    height: 20px;
    margin-right: 5px;
}

#top-bar .toggle-button {
    background: none;
    border: none;
    color: white;
    font-size: 1em; /* Ajusta o tamanho do ícone */
    cursor: pointer;
    position: absolute;
    left: 10px; /* Menor margem lateral */
    transition: transform 0.3s ease-in-out;
}

.user-info {
    font-size: 9px;
    color: #f0f0f0;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px; /* reduzido para não colidir com o botão */
}


.logout-button {
    background-color: #FFAA00;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 0.8em;
    cursor: pointer;
    margin-left: 8px;
}

.logout-button:hover {
    background-color: #cc8800; /* Laranja mais escuro */
}

#map {
    width: 100%; /* Agora ocupa toda a largura disponível */
    height: calc(100vh - 30px);
    position: absolute;
    top: 30px;
    left: 0;
    z-index: 500; /* Certifica-se de que o mapa fique atrás do painel */
}

#filter-panel {
    width: 200px; /* Reduzido de 350px */
    height: calc(100vh - 30px);
    background: #f0f0f0; /* Cinza claro */
    padding: 8px; /* Reduzido de 20px */
    box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    position: absolute; /* Alterado de fixed para absolute */
    left: 0;
    top: 30px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    font-size: 0.7em; /* Reduz o tamanho do texto */
}

#filter-panel.hidden {
    transform: translateX(-300px); /* Ajustado para largura reduzida */
}

#filter-panel h3 {
    margin-top: 0;
    font-size: 1em; /* Reduzido de 1.5em */
    color: #333;
    font-weight: bold;
    cursor: pointer; /* Permite clicar no título principal */
    user-select: none; /* Evita seleção de texto ao clicar */
}

.filter-group {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px; /* Reduz o espaço interno nos grupos */
    margin-bottom: 5px; /* Diminui o espaçamento entre grupos */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-group h4 {
    margin-top: 0;
    font-size: 1em; /* Reduzido de 1.2em */
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;
    margin-bottom: 5px;
    cursor: pointer; /* Indica que o título é clicável */
    user-select: none; /* Evita seleção de texto ao clicar */
    transition: all 0.3s ease;
}


#filter-panel.collapsed > .filter-group {
    display: none; /* Esconde todos os grupos de filtros */
}
.filter-group div {
    margin-bottom: 3px;
}
.filter-group.collapsed > div {
    display: none; /* Esconde os itens quando o grupo está recolhido */
}
.price-range {
    margin-top: 10px;
}

.ui-slider-range {
    background: #FFAA00; /* Laranja suave */
}

.ui-slider-handle {
    border-color: #FFAA00; /* Laranja suave */
}

.custom-icon {
    position: relative;
    text-align: center;
}

.custom-icon .price-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: yellow;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    color: black;
    white-space: nowrap;
}

.custom-icon .discount-label {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: rgb(255, 0, 0);
    color: rgb(255, 255, 255);
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-icon .discount-light-label {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #f37e7ef3; /* vermelho clarinho */
    color: rgb(255, 255, 255);
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-icon .perc_de_luta-label {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: green;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    #filter-panel {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: none;
    }

    #map {
        width: 100%;
        height: calc(100vh - 300px);
    }

    .filter-group {
        margin-bottom: 10px;
    }

    .price-range {
        margin-top: 5px;
    }

    #filter-panel h3 {
        font-size: 1.1em; /* Ajuste para telas menores */
    }

    .ui-slider-handle {
        width: 1em;
        height: 1em;
    }
}

@media (max-width: 480px) {
    #filter-panel {
        padding: 10px;
    }

    #filter-panel h3 {
        font-size: 1em;
    }

    .filter-group {
        margin-bottom: 5px;
    }

    .price-range {
        margin-top: 2px;
    }
}

.collapsed {
    display: none;
}

/* Ajusta a posição da Política de Privacidade para não ficar atrás do menu */
.dynamic-page {
  position: absolute;
  left: 220px; /* Ajuste esse valor conforme necessário */
  margin-left: auto;  /* Garante que o deslocamento seja aplicado corretamente */
  margin-right: auto;
}
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 6px;
}

.toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}
#loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.1); /* semi-transparente */
  backdrop-filter: blur(1px); /* efeito de desfoque opcional */
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estilo para itens bloqueados para usuários Basic */
.locked-feature {
    opacity: 0.5;
    /* pointer-events: none; */
    background-color: #eee !important;
    color: #666 !important;
    cursor: not-allowed;
}
