/*
 * Styles for the GOES-19 estimated reflectivity map (api/samuel).
 * Loaded once by app/index.html, so the template fragment needs no <link>:
 * a stylesheet inside the fragment would be fetched from the app origin,
 * without the ID token, and rejected by the API's static-file guard.
 */

:root {
    --toolbar-bg: rgba(17, 24, 39, 0.82);
    --toolbar-border: rgba(255, 255, 255, 0.12);
    --toolbar-accent: #4da3ff;
}

#map {
    height: 100%;
    width: 100%;
    background: #111;
}

/* Keep the estimate unmistakable, next to the legend. */
.aviso-estimativa {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid var(--toolbar-border);
    color: #e5e7eb;
    font-size: 0.78rem;
    line-height: 1.35;
    backdrop-filter: blur(3px);
}

.aviso-estimativa strong {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.aviso-estimativa span {
    color: rgba(229, 231, 235, 0.78);
}

.controle-rodape {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

#toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: var(--toolbar-bg);
    border: 1px solid var(--toolbar-border);
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    min-width: 240px;
    padding: 12px 16px 14px;
    backdrop-filter: blur(3px);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.toolbar-group--time {
    justify-content: space-between;
}

.toolbar-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--toolbar-border);
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 1rem;
    line-height: 1;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.toolbar-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.toolbar-btn--primary {
    background: var(--toolbar-accent);
    border-color: transparent;
    min-width: 72px;
}

.toolbar-btn--primary:hover {
    background: #2f8ce6;
}

#timestamp {
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.toolbar-opacity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#opacitySlider {
    flex: 1;
    width: auto;
    min-width: 80px;
    height: 28px;
    margin: 0;
    accent-color: var(--toolbar-accent);
    touch-action: none;
}

#opacityLabel {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    min-width: 2.5rem;
}

.toolbar-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    max-width: 100%;
}

.legenda-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
}

.legenda-item i {
    width: 16px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.legenda-item b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px), (pointer: coarse) {
    .aviso-estimativa {
        top: 8px;
        left: 8px;
        font-size: 0.72rem;
        padding: 8px 10px;
    }

    .controle-rodape {
        left: max(12px, env(safe-area-inset-left));
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    #toolbar {
        min-width: 0;
        max-width: calc(100vw - 24px);
        padding: 10px 12px 12px;
    }

    #timestamp {
        font-size: 1.4rem;
    }

    .toolbar-legend {
        display: none;
    }
}
