#map {
    height: calc(100vh - 160px);
    width: 100%
}

#controls {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 400px;
}

.row {
    margin-bottom: 8px;
}

.row label {
    display: inline-block;
    width: 80px;
    font-weight: bold;
    font-size: 12px;
}

input,
select,
textarea {
    font-family: monospace;
    font-size: 12px;
}

#time {
    width: 220px;
}

#tle-area {
    width: 100%;
    height: 60px;
    box-sizing: border-box;
    resize: vertical;
    margin-top: 5px;
}

button {
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
}

#status {
    font-size: 11px;
    color: #555;
    margin-left: 5px;
    font-style: italic;
}

.label-sat {
    background: white;
    border: 1px solid #000;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;

    position: absolute;
    top: 0;
    left: 0;
    /* Questo centra il DIV rispetto al suo punto di origine */
    transform: translate(-50%, -100%);
}

.utm-label-coarse {
    /* Posizionamento assoluto rispetto al punto di ancoraggio [0,0] del parent */
    position: absolute;
    top: 0;
    left: 0;
    /* Questo centra il DIV rispetto al suo punto di origine */
    transform: translate(-50%, -50%);

    /* Stile Visuale */
    background-color: rgba(255, 255, 255, 0.9);
    /* Sfondo bianco quasi opaco */
    border: 1px solid #999;
    border-radius: 4px;
    padding: 2px 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);

    /* Testo */
    white-space: nowrap;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 11px;
    color: #333;
    text-align: center;

    /* Layout Flex per centrare il testo verticalmente se necessario */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Interazione */
    pointer-events: none;
    z-index: 1000;
    /* Assicura che stia sopra le linee */
}


.tile-label-detail {
    font-size: 10px;
    color: #004400;
    font-weight: bold;
    text-shadow: 0 0 2px #fff;
}

/* Popup Stile */
.pass-popup {
    font-size: 13px;
    line-height: 1.5;
}

.pass-popup b {
    color: #0078A8;
}

.pass-popup .loading {
    color: #666;
    font-style: italic;
}

/* LEGENDA STYLE */
#legend {
    position: absolute;
    bottom: 20px;
    right: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: sans-serif;
    font-size: 12px;
    max-width: 200px;
    display: none;
    /* Nascosto finché non ci sono satelliti */
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid #999;
}

.legend-name {
    font-weight: bold;
    color: #333;
}