﻿html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.themebody-wrap,
.theme-body,
.container-fluid,
.row,
.col-md-12,
.card,
.card-body {
    height: 100vh;
}

#map {
    height: calc(100% - 30px);
    /* Ajusta para a tarja */
    width: 100%;
}

.card-body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Adicionar contêiner para centralizar online-counter e km-display */
#counter-container {
    background: #333333 !important;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2000;
}

#online-counter {
    background-color: #333333 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9) !important;
    font-weight: 900 !important;
    font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
    position: relative;
    display: inline-block;
    padding: 8px 8px 8px 16px;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    line-height: 1.2;
}

/* Adicionar estilo para #km-display */
#km-display {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-color: #333333 !important;
    color: #33ff33 !important;
    -webkit-text-fill-color: #33ff33 !important;
    text-shadow: 0 0 2px #00ff00, 0 0 1px #00ff00, 0 1px 3px rgba(0,0,0,0.9) !important;
    font-weight: 900 !important;
    font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
    position: relative;
    display: inline-block;
    background-color: transparent;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    padding: 8px 16px 8px 0px;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    line-height: 1.2;
}

.help-icon {

    /**/
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background-color: white;
    color: #000000;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    transition: background-color 0.2s;
}

    .help-icon:hover {
        background-color: #cccccc;
    }

/* Evita sobreposição do badge reCAPTCHA com o #online-counter */
.grecaptcha-badge {
    bottom: 40px !important;
    z-index: 3000 !important;
}

/* Gráficos */
#chart-icon {
    font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
    display: inline-block;
    color: #333333;
    text-align: center;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
}

    #chart-icon:hover {
        color: #333333;
    }

/* Para exibir Clima tempo */
#weather-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #333333;
    color: white;
    font-weight: bold;
    padding: 10px 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#weather-description {
    background-color: #333333 !important; /* fundo ESCURO FORÇADO */
    color: #ffffff !important; /* branco FORÇADO */
    -webkit-text-fill-color: #ffffff !important; /* iOS/TV */
    text-shadow: 0 0 8px rgba(0,0,0,0.8) !important; /* sombra preta forte */
    font-weight: 700 !important;
    font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
}

/* Para exibir Precisão GPS */
.accuracy-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

#accuracy-icon {
    font-size: 16px;
}

#accuracy-display {
    line-height: 1.2;
}

/* Estilo para o balão de velocidade no canto superior direito */
#speed-balloon {
    position: fixed;
    top: 50px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 14px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.speed-row,
.battery-row,
.timestamp-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

/* Ícone de velocidade (opcional, usando emoji ou imagem) */
#speed-icon,
#battery-icon,
#timestamp-icon {
    font-size: 16px;
}

#speed-display,
#battery-display,
#timestamp-display {
    line-height: 1.2;
}

.battery-percentage,
.gp {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

/* Estilo para o texto flutuante de velocidade acima do marcador atual */
.speed-text {
    position: absolute;
    background-color: #ffffffd4;
    color: #DE4A84;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: bold;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1000;
    white-space: nowrap;
    transition: left 0.3s ease, top 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.speed-balloon {
    position: relative;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: fit-content;
}

.floating-icons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.floating-icon {
    font-size: 15px;
    cursor: pointer;
    background-color: #1E3A5F;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s;
}

    .floating-icon:hover {
        background-color: #0056b3;
    }

.speed-row,
.battery-row,
.accuracy-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    margin-left: 40px;
}

#speed-icon,
#battery-icon,
#accuracy-icon,
#timestamp-icon {
    margin-right: 8px;
    font-size: 16px;
}

#speed-display,
#battery-display,
#accuracy-display,
#timestamp-display {
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 768px) {
    #online-counter,
    #km-display {
        font-size: 17px;
        padding: 6px;
    }

    .grecaptcha-badge {
        bottom: 48px !important;
    }

    #speed-balloon {
        top: 40px;
        font-size: 12px;
        padding: 6px 10px;
    }

    .speed-row,
    .battery-row,
    .timestamp-row,
    .accuracy-row {
        gap: 3px;
    }

    .speed-text {
        font-size: 12px;
        padding: 2px 4px;
    }
}

@media (max-width: 480px) {
    #online-counter,
    #km-display {
        font-size: 17px;
        padding: 4px;
    }

    .grecaptcha-badge {
        bottom: 44px !important;
    }
}


#moon-emoji {
    transition: filter 1s ease, transform 1s ease;
}

    /* Brilho progressivo conforme a classe */
    #moon-emoji.young,
    #moon-emoji.waxing_crescent,
    #moon-emoji.waxing_quarter {
        filter: drop-shadow(0 0 6px #fff2) drop-shadow(0 0 12px #fffa);
        transform: scale(1.00);
    }

    #moon-emoji.waxing_gibbous,
    #moon-emoji.full,
    #moon-emoji.waning_gibbous {
        filter: drop-shadow(0 0 10px #fff6) drop-shadow(0 0 25px #ffd700cc);
    }

    /* Lua Cheia com animação intensa */
    #moon-emoji.full {
        animation: brilhoIntenso 3s infinite alternate;
    }

    /* Fases minguantes com brilho decrescente */
    #moon-emoji.waning_quarter,
    #moon-emoji.waning_crescent,
    #moon-emoji.old {
        filter: drop-shadow(0 0 6px #fff2) drop-shadow(0 0 10px #ffd70055);
        transform: scale(0.98);
    }

/* Animação suave da Lua Cheia */
@@keyframes brilhoIntenso {
    0% {
        filter: drop-shadow(0 0 15px #fff) drop-shadow(0 0 30px #ffd700);
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 30px #fff) drop-shadow(0 0 60px #ffd700);
        transform: scale(1.06);
    }
}



/* Estilo para os botões de GPX e KML */
#export-buttons {
    position: fixed;
    bottom: 35px; /* ajuste só se quiser subir/baixar mais */
    left: 20px;
    z-index: 1000;
    display: flex;
    gap: 18px;
    pointer-events: auto;
}

.export-btn.icon-only {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
    border: 2.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.55);
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center; /* ← centraliza verticalmente */
    justify-content: center; /* ← centraliza horizontalmente */
    overflow: hidden;
}

    .export-btn.icon-only img.export-icon {
        width: 36px; /* tamanho perfeito pro círculo de 64px */
        height: 36px;
        object-fit: contain; /* ← garante que o PNG não seja esticado */
        user-select: none;
        pointer-events: none;
        transition: transform 0.28s ease;
    }

    .export-btn.icon-only:hover {
        background: rgba(0, 122, 255, 0.95);
        border-color: #007AFF;
        transform: translateY(-7px) scale(1.1);
        box-shadow: 0 14px 35px rgba(0, 122, 255, 0.6);
    }

        .export-btn.icon-only:hover img.export-icon {
            transform: scale(1.22);
        }