/* ================================================
   Importação de Fontes do Google Fonts
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Montserrat:wght@600&display=swap');

/* ================================================
   Estilos Globais
   ================================================ */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fonte Padrão */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #1a1a1a; /* Tons mais escuros */
    color: #ecf0f1; /* Texto claro para contraste */
    overflow: hidden; /* Evita barras de rolagem */
    line-height: 1.6;
    font-size: 16px;
}

/* Seletores de Texto */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 10px;
    color: #1abc9c; /* Verde vibrante para títulos */
}

p {
    margin-bottom: 15px;
    font-size: 1em;
    color: #ecf0f1;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
    list-style: none; /* Remove marcadores */
}

li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 0; /* Remove padding para alinhar texto */
}

/* ================================================
   Estilos para os Painéis
   ================================================ */

#infoPanel, #errorPanel, #messagesPanel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 26, 26, 0.95); /* Fundo semi-transparente escuro */
    color: #ecf0f1;
    padding: 20px 25px; /* Padding reduzido para mobile */
    border-radius: 10px; /* Bordas mais suaves */
    z-index: 1000;
    display: none;
    width: 400px; /* Aumentado de 300px para 350px */
    max-width: 95%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#infoPanel.show, #errorPanel.show, #messagesPanel.show {
    display: block;
}

#infoPanel h3, #errorPanel h3, #messagesPanel h3 {
    font-size: 1.4em;
    text-align: center;
    color: #1abc9c; /* Verde vibrante para títulos */
}

#infoPanel p, #errorPanel p, #messagesPanel p {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #ecf0f1;
}

/* Botões de Fechar */
#closeInfo, #closeError, #closeMessages {
    margin-top: 10px;
    padding: 8px 14px;
    background: #1abc9c; /* Verde para botões */
    border: none;
    color: #1a1a1a; /* Texto escuro no botão */
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    display: block;
    width: 100%;
    font-size: 0.9em;
}

#closeInfo:hover, #closeError:hover, #closeMessages:hover {
    background: #16a085; /* Verde escuro ao passar o mouse */
    transform: translateY(-2px);
}

/* ================================================
   Estilos para o Overlay
   ================================================ */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 999;
    background: rgba(0, 0, 0, 0.6);
    transition: background 0.3s ease;
}

/* ================================================
   Estilos para Notificações
   ================================================ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1a1a1a; /* Fundo escuro */
    color: #ecf0f1; /* Texto claro */
    padding: 10px 15px;
    border-radius: 8px;
    opacity: 0;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: 'Roboto', sans-serif;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    transition: all 0.5s ease;
}

.notification.info {
    background: #1abc9c; /* Verde para info */
    border-left: 6px solid #16a085;
}

.notification.success {
    background: #2ecc71; /* Verde mais claro para sucesso */
    border-left: 6px solid #27ae60;
}

.notification.error {
    background: #e74c3c; /* Vermelho para erro */
    border-left: 6px solid #c0392b;
}

.notification .icon {
    margin-right: 10px;
    font-size: 1.2em;
}

/* ================================================
   Estilos para Mensagens
   ================================================ */
#messagesPanel ul {
    list-style-type: none; /* Remove marcadores */
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0;
}

#messagesPanel ul li {
    background: rgba(26, 26, 26, 0.8); /* Fundo escuro para itens */
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
}

#messagesPanel ul li:hover {
    background: rgba(26, 26, 26, 0.9);
}

#messagesPanel ul li .message-icon {
    margin-right: 10px;
    font-size: 1.2em;
    color: #1abc9c; /* Verde para ícones */
}

#messagesPanel ul li .message-text {
    flex: 1;
    font-size: 0.9em;
    color: #ecf0f1;
}

/* ================================================
   Estilos para Erros
   ================================================ */
#errorPanel ul {
    list-style-type: none; /* Remove marcadores */
    padding-left: 0;
}

#errorPanel ul li {
    background: rgba(26, 26, 26, 0.8); /* Fundo escuro para itens de erro */
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
}

#errorPanel ul li:hover {
    background: rgba(26, 26, 26, 0.9);
}

#errorPanel ul li .error-icon {
    margin-right: 10px;
    font-size: 1.2em;
    color: #e74c3c; /* Vermelho para ícones de erro */
}

#errorPanel ul li .error-text {
    flex: 1;
    font-size: 0.9em;
    color: #ecf0f1;
}

/* ================================================
   Estilos para Informações de Localização
   ================================================ */
#location-info {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(26, 26, 26, 0.95); /* Fundo escuro */
    color: #ecf0f1;
    padding: 10px 15px; /* Padding reduzido */
    border-radius: 8px; /* Bordas mais suaves */
    z-index: 1003;
    display: none;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    max-width: 400px; /* Largura reduzida */
}

#location-info.show {
    display: block;
}

#location-info #location-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    margin-bottom: 8px;
    color: #1abc9c; /* Verde para o nome */
}

#location-info #lat-long-container span {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85em;
    color: #ecf0f1;
}

/* ================================================
   Estilos para o Logo
   ================================================ */
#fixed-logo {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 100px; /* Diminuído para mobile */
    height: auto;
    z-index: 1002;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#fixed-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.error-icon, .message-icon{
    margin-right:5px;
}

/* ================================================
   Responsividade
   ================================================ */
@media (max-width: 600px) {
    #infoPanel, #errorPanel, #messagesPanel, #location-info {
        width: 90%;
        padding: 15px 20px; /* Ajuste de padding para mobile */
    }

    #infoPanel, #errorPanel, #messagesPanel {
        width: 320px; /* Aumentado em relação ao mobile padrão */
    }

    #fixed-logo {
        width: 80px; /* Diminuído para mobile */
        top: 20px; /* Posiciona no topo */
        right: 20px; /* Posiciona à direita */
        bottom: auto; /* Remove o posicionamento inferior */
        left: auto; /* Remove o posicionamento esquerdo */
    }

    #infoPanel h3, #errorPanel h3, #messagesPanel h3, #location-info #location-name {
        font-size: 1.1em; /* Ajuste de tamanho de fonte para mobile */
    }

    .notification {
        width: 260px;
        font-size: 0.85em;
    }

    #messagesPanel ul {
        max-height: 200px;
    }

    /* Ajuste da Caixa de Informações de Localização */
    #location-info {
        /*max-width: 200px;  Largura ainda menor para mobile */
        padding: 5px 12px;
        left: 0; /* Para ocupar toda a largura */
        right: 0;
        bottom: 0;
        top: auto; /* Remove o posicionamento superior */
        border-radius:0;
        width: 100%;
    }

    #location-info {
        width: 100%; /* Ocupa toda a largura */
    }

    /* Reduz o tamanho das fontes dentro dos painéis */
    #infoPanel p, #errorPanel p, #messagesPanel p, #messagesPanel ul li .message-text, #errorPanel ul li .error-text, #location-info #lat-long-container span {
        font-size: 0.85em;
    }

    /* Ajuste do tamanho do logo no canto superior direito */
    #fixed-logo {
        width: 60px;
    }
}

#silo-options button {
    background-color: #4CAF50; /* Verde */
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#silo-options button:hover {
    background-color: #45a049; /* Verde mais escuro */
}
/* Estilo para o Tooltip */
#tooltip {
    position: absolute;
    display: none;
    pointer-events: none;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    transition: opacity 0.3s;
}

#tooltip.visible {
    display: block;
    opacity: 1;
}
