/* Race Track Map Styles */

.race-track-map {
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Km marker custom icon */
.km-marker-icon {
    background-color: #DC143C;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 11px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    text-align: center;
    line-height: 24px;
}

.km-marker-icon div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Special markers (start/finish) */
.special-marker-icon {
    border: 3px solid white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    text-align: center;
    line-height: 28px;
}

.special-marker-icon div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Start marker - red */
.start-marker {
    background-color: #DC143C;
}

/* Finish marker - red */
.finish-marker {
    background-color: #DC143C;
}

/* Special marker popup */
.special-marker-popup {
    min-width: 100px;
    text-align: center;
}

.special-marker-popup strong {
    font-size: 14px;
}

/* Track polyline styling */
.track-polyline {
    stroke: #DC143C;
    stroke-width: 4px;
    stroke-opacity: 0.8;
}

/* Km marker popup */
.km-marker-popup {
    min-width: 120px;
    text-align: center;
}

.km-marker-popup strong {
    color: #DC143C;
    font-size: 14px;
}

/* Location marker popup */
.location-marker-popup {
    min-width: 150px;
}

.location-marker-popup strong {
    color: #2196F3;
    font-size: 14px;
}

.location-marker-popup .distance {
    font-weight: bold;
    color: #4CAF50;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 13px;
}

/* Map controls */
.leaflet-control-container .leaflet-top.leaflet-left {
    margin-top: 10px;
}

.leaflet-control-container .leaflet-top.leaflet-right {
    margin-top: 10px;
}

/* Track info section */
.track-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.track-info h3 {
    margin-top: 0;
    color: #2c3e50;
}

.track-info ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.track-info li {
    padding: 5px 0;
}

/* Result messages */
.result-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.result-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

/* Warning messages */
.no-track-warning {
    padding: 20px;
    background: #fff3cd;
    border-radius: 4px;
    border: 1px solid #ffc107;
    color: #856404;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .race-track-map {
        height: 400px !important;
    }

    .km-marker-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}
