/* Fleet Map Styles */

/* Map Container */
.fleet-map-container {
    width: 100%;
    min-height: 400px;
    border-radius: 4px;
    overflow: hidden;
}

/* Marker Styles */
.fleet-marker-container {
    background: transparent !important;
    border: none !important;
}

.fleet-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.fleet-marker:hover {
    transform: rotate(-45deg) scale(1.1);
}

.fleet-marker-count {
    transform: rotate(45deg);
    font-weight: bold;
    font-size: 12px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Marker Colors */
.fleet-marker-available {
    background: linear-gradient(135deg, #4caf50, #388e3c);
}

.fleet-marker-partial {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.fleet-marker-unavailable {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

/* Popup Styles */
.fleet-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.fleet-popup .leaflet-popup-content {
    margin: 0;
    min-width: 560px;
    max-height: 400px;
    overflow-y: auto;
}

.fleet-popup .leaflet-popup-tip {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.fleet-popup-content {
    font-family: 'Montserrat', sans-serif;
}

.fleet-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    border-radius: 8px 8px 0 0;
}

.fleet-popup-header-left {
    flex: 1;
    min-width: 0;
}

.fleet-popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fleet-popup-address {
    margin: 0 !important;
    font-size: 12px;
    line-height: 1.1;
    opacity: 0.9;
}

.fleet-popup-summary {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-left: 12px;
    flex-shrink: 0;
}

.fleet-popup-available {
    font-size: 22px;
    font-weight: bold;
}

.fleet-popup-separator {
    font-size: 16px;
    opacity: 0.7;
}

.fleet-popup-total {
    font-size: 16px;
    opacity: 0.8;
}

.fleet-popup-label {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 6px;
}

/* Car List */
.fleet-popup-list {
    max-height: 250px;
    overflow-y: auto;
}

.fleet-popup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.fleet-popup-item:hover {
    background-color: #f5f5f5;
}

.fleet-popup-item:last-child {
    border-bottom: none;
}

.fleet-popup-car-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fleet-popup-vrn {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.fleet-popup-model {
    font-size: 12px;
    color: #666;
}

.fleet-popup-job,
.fleet-popup-return {
    font-size: 11px;
    color: #888;
}

.fleet-popup-loan-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    margin-top: 2px;
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    border-radius: 4px;
}

.fleet-popup-car-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.fleet-popup-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.status-available {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-in-use {
    background-color: #fff3e0;
    color: #ef6c00;
}

.status-inactive {
    background-color: #f5f5f5;
    color: #9e9e9e;
}

.fleet-popup-edit-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #1976d2;
    background: transparent;
    border: 1px solid #1976d2;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.fleet-popup-edit-btn:hover {
    background: #1976d2;
    color: white;
}

.fleet-popup-empty {
    padding: 24px 16px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

/* Dark Mode Support */
.mud-theme-dark .fleet-popup .leaflet-popup-content-wrapper {
    background-color: #424242;
}

.mud-theme-dark .fleet-popup-item {
    border-bottom-color: #555;
}

.mud-theme-dark .fleet-popup-item:hover {
    background-color: #4a4a4a;
}

.mud-theme-dark .fleet-popup-vrn {
    color: #fff;
}

.mud-theme-dark .fleet-popup-model {
    color: #bbb;
}

.mud-theme-dark .fleet-popup-job,
.mud-theme-dark .fleet-popup-return {
    color: #999;
}

.mud-theme-dark .status-inactive {
    background-color: #555;
    color: #999;
}

.mud-theme-dark .fleet-popup-loan-badge {
    background-color: #1e3a5f;
    color: #90caf9;
    border-color: #42a5f5;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .fleet-popup .leaflet-popup-content {
        max-height: 300px;
    }

    .fleet-popup-header h3 {
        font-size: 14px;
    }

    .fleet-popup-available {
        font-size: 24px;
    }

    .fleet-popup-item {
        padding: 10px 12px;
    }
}
