/**
 * Frontend-Styles für Inklusionet Mobility Vehicles
 * Design analog zum FBM QR-Code Plugin, Cirkle Theme inspiriert
 * Prefix: .fbm-veh- (keine Konflikte mit anderen Plugins)
 */

/* Error Messages */
.fbm-veh-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Dashboard */
.fbm-veh-dashboard {
    margin: 20px auto;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1; /* Niedriger z-index, damit es unter dem Header bleibt */
}

.fbm-veh-dashboard-header {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fbm-veh-dashboard-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
    color: #212529;
}

.fbm-veh-dashboard-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
}

.fbm-veh-dashboard-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Tabs */
.fbm-veh-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
}

.fbm-veh-tabs li {
    flex: 1;
    margin: 0;
    min-width: 120px;
}

.fbm-veh-tab {
    display: block;
    width: 100%;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #6c757d;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.fbm-veh-tab:hover {
    background: #fff;
    color: #495057;
}

.fbm-veh-tab.is-active {
    background: #fff;
    color: #007bff;
    border-bottom-color: #007bff;
}

.fbm-veh-tab i {
    margin-right: 8px;
}

/* Tab Content */
.fbm-veh-tab-content {
    padding: 30px;
}

.fbm-veh-tab-panel {
    display: none;
}

.fbm-veh-tab-panel.is-active {
    display: block;
}

/* Titles */
.fbm-veh-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.fbm-veh-subtitle {
    margin: 20px 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.fbm-veh-tab-description {
    margin: 0 0 20px 0;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    color: #495057;
    font-size: 14px;
    line-height: 1.6;
}

.fbm-veh-tab-actions {
    margin-bottom: 25px;
}

/* Filters */
.fbm-veh-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fbm-veh-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.fbm-veh-filter-group {
    display: flex;
    flex-direction: column;
}

.fbm-veh-filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.fbm-veh-filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* Forms */
.fbm-veh-input,
.fbm-veh-select,
.fbm-veh-textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.fbm-veh-input:focus,
.fbm-veh-select:focus,
.fbm-veh-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.fbm-veh-textarea {
    resize: vertical;
    min-height: 100px;
}

.fbm-veh-form-group {
    margin-bottom: 20px;
}

.fbm-veh-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.fbm-veh-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.fbm-veh-form-group .description {
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.fbm-veh-form-actions {
    margin-top: 30px;
    text-align: right;
}

/* Buttons */
.fbm-veh-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.fbm-veh-btn-primary {
    background: #007bff;
    color: #fff;
}

.fbm-veh-btn-primary:hover {
    background: #0056b3;
    color: #fff;
}

.fbm-veh-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.fbm-veh-btn-secondary:hover {
    background: #545b62;
    color: #fff;
}

.fbm-veh-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.fbm-veh-btn i {
    margin-right: 5px;
}

/* Grid */
.fbm-veh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Cards */
.fbm-veh-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

/* Verhindere doppelte Schatten bei verschachtelten Cards */
.fbm-veh-card .fbm-veh-card {
    box-shadow: none;
    margin-bottom: 0;
    padding: 0;
}

.fbm-veh-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fbm-veh-card-header {
    margin-bottom: 15px;
    padding-right: 80px; /* Platz für Badges rechts oben */
}

.fbm-veh-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.fbm-veh-card-title i {
    margin-right: 8px;
    color: #007bff;
}

.fbm-veh-card-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

.fbm-veh-card-body {
    margin-bottom: 15px;
}

.fbm-veh-card-description {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
}

.fbm-veh-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.fbm-veh-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.fbm-veh-meta-item i {
    color: #007bff;
    width: 16px;
}

.fbm-veh-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.fbm-veh-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.fbm-veh-badge-feature {
    background: #e7f3ff;
    color: #0056b3;
}

.fbm-veh-card-status {
    margin-bottom: 15px;
}

.fbm-veh-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.fbm-veh-status-active {
    background: #d4edda;
    color: #155724;
}

.fbm-veh-status-maintenance {
    background: #fff3cd;
    color: #856404;
}

.fbm-veh-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.fbm-veh-status-requested {
    background: #d1ecf1;
    color: #0c5460;
}

.fbm-veh-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.fbm-veh-status-in_progress {
    background: #cce5ff;
    color: #004085;
}

.fbm-veh-status-completed {
    background: #d4edda;
    color: #155724;
}

.fbm-veh-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.fbm-veh-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Booking Card Specific */
.fbm-veh-booking-card {
    position: relative;
}

.fbm-veh-booking-route {
    margin-bottom: 20px;
}

.fbm-veh-route-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.fbm-veh-route-point i {
    color: #007bff;
    font-size: 18px;
    margin-top: 2px;
}

.fbm-veh-route-start i {
    color: #28a745;
}

.fbm-veh-route-destination i {
    color: #dc3545;
}

.fbm-veh-route-info {
    flex: 1;
}

.fbm-veh-route-info strong {
    display: block;
    margin-bottom: 5px;
    color: #212529;
    font-size: 14px;
}

.fbm-veh-route-info p {
    margin: 0;
    color: #6c757d;
    font-size: 13px;
}

.fbm-veh-route-time {
    margin-top: 5px;
    font-size: 12px;
}

.fbm-veh-route-time i {
    margin-right: 5px;
    margin-left: 8px;
}

.fbm-veh-route-arrow {
    text-align: center;
    margin: 5px 0;
    color: #6c757d;
}

.fbm-veh-booking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Map */
.fbm-veh-map-container {
    margin-bottom: 30px;
    position: relative;
    z-index: 1; /* Niedriger z-index, damit Map unter dem Header bleibt */
}

.fbm-veh-map {
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    position: relative;
    z-index: 1;
}

.fbm-veh-map-info {
    text-align: center;
}

.fbm-veh-map-note {
    margin: 0;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 6px;
    color: #0056b3;
    font-size: 13px;
}

.fbm-veh-map-note i {
    margin-right: 5px;
}

/* Availability */
.fbm-veh-availability-results {
    margin-top: 30px;
}

.fbm-veh-availability-date {
    font-size: 16px;
    font-weight: normal;
    color: #6c757d;
    margin-left: 10px;
}

.fbm-veh-availability-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #28a745;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    z-index: 2; /* Niedriger z-index, nur innerhalb der Card */
    line-height: 1.2;
    white-space: nowrap;
}

.fbm-veh-availability-badge i {
    margin-right: 4px;
}

/* Archive */
.fbm-veh-archive-description {
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
}

.fbm-veh-archive-card {
    opacity: 0.85;
}

/* Verhindere doppelte Schatten bei Archive-Cards */
.fbm-veh-archive-card.fbm-veh-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fbm-veh-archive-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #6c757d;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    z-index: 2; /* Niedriger z-index, nur innerhalb der Card */
    line-height: 1.2;
    white-space: nowrap;
}

.fbm-veh-archive-badge i {
    margin-right: 4px;
}

.fbm-veh-archive-vehicles {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e9ecef;
}

/* Dummy Badge */
.fbm-veh-dummy-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffc107;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 3; /* Niedriger z-index, nur innerhalb der Card, aber über anderen Badges */
    line-height: 1.2;
    white-space: nowrap;
}

/* Settings */
.fbm-veh-settings-form {
    max-width: 800px;
}

.fbm-veh-settings-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.fbm-veh-settings-section:last-child {
    border-bottom: none;
}

.fbm-veh-settings-note {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #6c757d;
    font-size: 13px;
}

.fbm-veh-settings-note i {
    margin-right: 5px;
    color: #007bff;
}

/* Empty State */
.fbm-veh-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.fbm-veh-empty i {
    margin-bottom: 15px;
    color: #ced4da;
}

.fbm-veh-empty p {
    margin: 0;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .fbm-veh-tabs {
        flex-direction: column;
    }
    
    .fbm-veh-tab {
        border-bottom: 1px solid #e9ecef;
        border-left: 3px solid transparent;
    }
    
    .fbm-veh-tab.is-active {
        border-left-color: #007bff;
        border-bottom-color: #e9ecef;
    }
    
    .fbm-veh-tab-content {
        padding: 20px 15px;
    }
    
    .fbm-veh-filter-row,
    .fbm-veh-form-row {
        grid-template-columns: 1fr;
    }
    
    .fbm-veh-grid {
        grid-template-columns: 1fr;
    }
    
    .fbm-veh-card-actions {
        flex-direction: column;
    }
    
    .fbm-veh-btn {
        width: 100%;
    }
    
    .fbm-veh-map {
        height: 250px;
    }
}

/* Leaflet Map Overrides */
.fbm-veh-map .leaflet-container {
    border-radius: 8px;
    position: relative;
    z-index: 1; /* Niedriger z-index für Leaflet-Container */
}

/* Leaflet Popup und Controls z-index anpassen */
.fbm-veh-map .leaflet-popup,
.fbm-veh-map .leaflet-control {
    z-index: 2 !important; /* Popups und Controls können etwas höher sein, aber nicht über Header */
}

/* Leaflet Marker z-index */
.fbm-veh-map .leaflet-marker-pane {
    z-index: 2 !important;
}

