/* Map CSS - Leaflet map and related widgets */

/* Map container */
#map {
    height: calc(100vh - 50px);
    width: 100%;
    margin-top: 50px;
}

/* Freshness widget */
#freshness-widget {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background-color: var(--color-success);
    color: white;
    font-family: sans-serif;
    font-size: 14px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

#freshness-widget.fresh {
    background-color: var(--color-success);
}

#freshness-widget.stale {
    background-color: var(--color-danger);
}

#freshness-widget.disconnected {
    background-color: #555;
}

#freshness-widget:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Cursor coordinates widget */
#cursor-coords-widget {
    position: fixed;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-family: monospace;
    font-size: 12px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    line-height: 1.4;
}

#cursor-coords-widget div {
    white-space: nowrap;
}

/* Tooltip */
.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    transition: opacity 0.2s;
    box-shadow: var(--shadow-sm);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

/* Zone labels */
.zone-label {
    background: transparent;
    border: none;
    white-space: nowrap;
    font-weight: bold;
    font-size: 12px;
    color: #333;
    text-shadow: 1px 1px 2px white, -1px -1px 2px white, 1px -1px 2px white, -1px 1px 2px white;
    text-align: center;
}

.zone-label .fa-truck {
    font-size: 14px;
}

/* Player labels */
.player-label {
    background: transparent;
    border: none;
    white-space: nowrap;
    font-weight: bold;
    font-size: 11px;
    color: #333;
    text-shadow: 1px 1px 2px white, -1px -1px 2px white, 1px -1px 2px white, -1px 1px 2px white;
    text-align: center;
}

.player-label .fa-plane {
    font-size: 16px;
}

/* Ejected pilots labels */
.ejection-label {
    background: transparent;
    border: none;
    white-space: nowrap;
    font-weight: bold;
    font-size: 10px;
    color: #333;
    text-shadow: 1px 1px 2px white, -1px -1px 2px white, 1px -1px 2px white, -1px 1px 2px white;
    text-align: center;
}

.ejection-label .fa-parachute-box {
    font-size: 16px;
    color: orange;
}

.ejection-label.green .fa-parachute-box {
    color: var(--color-success-dark);
}

/* Ruler Widget */
.ruler-widget {
    position: fixed;
    bottom: 50px;
    left: 10px;
    width: 260px;
    background: linear-gradient(145deg, var(--bg-dark-5) 0%, var(--bg-dark-3) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    z-index: 1000;
    box-shadow: var(--shadow-md), 0 0 20px rgba(251, 191, 36, 0.1);
    overflow: hidden;
}

.ruler-widget.hidden {
    display: none;
}

.ruler-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(251, 191, 36, 0.15);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    font-weight: 600;
    color: #fbbf24;
}

.ruler-header i {
    font-size: 14px;
}

.ruler-clear {
    margin-left: auto;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ruler-clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.ruler-body {
    padding: 12px;
}

.ruler-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ruler-row:last-child {
    border-bottom: none;
}

.ruler-label {
    color: var(--text-muted);
}

.ruler-value {
    color: var(--text-primary);
    font-weight: 500;
    font-family: monospace;
}

.ruler-points {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ruler-point {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 11px;
}

.ruler-point-marker {
    width: 18px;
    height: 18px;
    background: linear-gradient(145deg, #fbbf24 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #1a1f2e;
    flex-shrink: 0;
}

.ruler-point-coords {
    color: var(--text-secondary);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ruler map markers */
.ruler-marker {
    background: transparent;
    border: none;
}

.ruler-marker-label {
    width: 24px;
    height: 24px;
    background: linear-gradient(145deg, #fbbf24 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #1a1f2e;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Settings modal */
.settings-section {
    margin: 16px 0;
}

.settings-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ccc;
}

.settings-section select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    background: var(--bg-dark-5);
    color: white;
    border: 1px solid #333;
    font-size: 14px;
    cursor: pointer;
}

.settings-section select:hover {
    border-color: #4266e8;
}

.settings-section select:focus {
    outline: none;
    border-color: #4266e8;
}

/* Settings actions */
.settings-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.settings-save-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(66, 99, 235, 0.4);
}

.settings-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 99, 235, 0.5);
}

.settings-save-btn:active {
    transform: translateY(0);
}
