/**
 * Vehicle Tracking Pro - Styles Frontend
 * Version: 1.0.0
 */

:root {
    --vt-primary-color: #0073aa;
    --vt-primary-light: #2295d4;
    --vt-primary-dark: #005a87;
    --vt-secondary-color: #23282d;
    --vt-success-color: #46b450;
    --vt-warning-color: #ffb900;
    --vt-danger-color: #dc3232;
    --vt-info-color: #00a0d2;
    --vt-light-color: #f8f9fa;
    --vt-dark-color: #1d2327;
    --vt-border-color: #e0e0e0;
    --vt-border-radius: 8px;
    --vt-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --vt-transition: all 0.3s ease;
}

/* Reset et base */
.vt-tracking-container,
.vt-tracking-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    box-sizing: border-box;
}

.vt-tracking-container *,
.vt-tracking-form * {
    box-sizing: border-box;
}

/* Conteneur principal */
.vt-tracking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.vt-tracking-details {
    background: #fff;
    border-radius: var(--vt-border-radius);
    box-shadow: var(--vt-box-shadow);
    overflow: hidden;
    margin: 30px 0;
    animation: vt-fadeIn 0.5s ease;
}

@keyframes vt-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* En-tête */
.vt-tracking-header {
    padding: 30px;
    background: linear-gradient(135deg, var(--vt-primary-color) 0%, var(--vt-primary-dark) 100%);
    color: white;
    position: relative;
}

.vt-tracking-header h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 700;
}

.vt-tracking-status {
    display: inline-block;
}

/* Barre de progression */
.vt-progress-bar {
    background: var(--vt-light-color);
    height: 8px;
    border-radius: 4px;
    margin: 20px 30px;
    position: relative;
    overflow: hidden;
}

.vt-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--vt-primary-color) 0%, var(--vt-primary-light) 100%);
    border-radius: 4px;
    transition: width 1s ease;
}

.vt-progress-labels {
    display: flex;
    justify-content: space-between;
    margin: 10px 30px;
    font-size: 12px;
    color: #666;
}

.vt-progress-labels span {
    flex: 1;
    text-align: center;
}

/* Onglets */
.vt-tracking-tabs {
    display: flex;
    border-bottom: 1px solid var(--vt-border-color);
    padding: 0 30px;
    gap: 5px;
}

.vt-tab {
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: var(--vt-transition);
    position: relative;
}

.vt-tab:hover {
    color: var(--vt-primary-color);
}

.vt-tab.active {
    color: var(--vt-primary-color);
    border-bottom-color: var(--vt-primary-color);
}

.vt-tab:focus {
    outline: none;
}

/* Contenu des onglets */
.vt-tab-content {
    padding: 30px;
    display: none;
    animation: vt-fadeIn 0.3s ease;
}

.vt-tab-content.active {
    display: block;
}

.vt-tab-content h3 {
    margin: 0 0 20px 0;
    color: var(--vt-dark-color);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Grille d'informations */
.vt-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.vt-info-item {
    background: var(--vt-light-color);
    padding: 20px;
    border-radius: var(--vt-border-radius);
    border-left: 4px solid var(--vt-primary-color);
}

.vt-info-item.full-width {
    grid-column: 1 / -1;
}

.vt-info-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--vt-dark-color);
    font-weight: 600;
}

.vt-info-item span,
.vt-info-item p {
    color: #555;
    line-height: 1.6;
}

.vt-info-item p {
    margin: 10px 0 0 0;
}

/* Badges de statut */
.vt-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vt-status-pending {
    background: #f0f0f0;
    color: #666;
}

.vt-status-processing {
    background: #e8f4fd;
    color: var(--vt-primary-color);
}

.vt-status-ready {
    background: #fff3cd;
    color: #856404;
}

.vt-status-in-transit {
    background: var(--vt-primary-color);
    color: white;
}

.vt-status-arrived {
    background: #d4edda;
    color: #155724;
}

.vt-status-delivered {
    background: #d1ecf1;
    color: #0c5460;
}

.vt-status-delayed {
    background: #f8d7da;
    color: #721c24;
}

.vt-status-cancelled {
    background: #f5c6cb;
    color: #721c24;
}

/* Notes générales */
.vt-general-notes {
    margin: 30px;
    padding: 25px;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: var(--vt-border-radius);
}

.vt-general-notes h3 {
    margin: 0 0 15px 0;
    color: #856404;
}

.vt-general-notes p {
    margin: 0;
    color: #856404;
    line-height: 1.8;
}

/* Pied de page */
.vt-tracking-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--vt-border-color);
    background: var(--vt-light-color);
    text-align: center;
}

.vt-timestamp {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Cartes d'information véhicule */
.vt-vehicle-info-card {
    background: #fff;
    border-radius: var(--vt-border-radius);
    box-shadow: var(--vt-box-shadow);
    padding: 25px;
    margin: 20px 0;
}

.vt-vehicle-image {
    text-align: center;
    margin-bottom: 20px;
}

.vt-image-placeholder {
    width: 200px;
    height: 150px;
    background: var(--vt-light-color);
    border-radius: var(--vt-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.vt-image-placeholder .dashicons {
    font-size: 60px;
    color: var(--vt-primary-color);
    width: 60px;
    height: 60px;
}

.vt-vehicle-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.vt-field {
    padding: 12px 15px;
    background: var(--vt-light-color);
    border-radius: 6px;
}

.vt-field strong {
    display: block;
    color: var(--vt-dark-color);
    font-size: 14px;
    margin-bottom: 5px;
}

.vt-field span {
    color: #555;
    font-size: 16px;
    font-weight: 500;
}

/* Cartes de statut */
.vt-tracking-status-card {
    background: #fff;
    border-radius: var(--vt-border-radius);
    box-shadow: var(--vt-box-shadow);
    padding: 25px;
    margin: 20px 0;
}

.vt-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.vt-status-header h3 {
    margin: 0;
    color: var(--vt-dark-color);
}

.vt-progress-container {
    margin: 20px 0;
}

.vt-progress-container .vt-progress-bar {
    margin: 0;
    height: 10px;
}

.vt-progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--vt-primary-color);
}

.vt-status-details {
    background: var(--vt-light-color);
    padding: 20px;
    border-radius: var(--vt-border-radius);
}

.vt-status-details p {
    margin: 10px 0;
    color: #555;
}

.vt-status-details strong {
    color: var(--vt-dark-color);
}

/* Barre de progression de livraison */
.vt-delivery-progress {
    background: var(--vt-light-color);
    border-radius: 10px;
    position: relative;
    margin: 20px 0;
}

.vt-progress-track {
    height: 100%;
    background: linear-gradient(90deg, var(--vt-primary-color) 0%, var(--vt-primary-light) 100%);
    border-radius: 10px;
    transition: width 1s ease;
}

.vt-progress-steps {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
}

.vt-progress-step {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
}

.vt-step-marker {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid #ddd;
    border-radius: 50%;
    margin: 0 auto 5px;
    transition: var(--vt-transition);
}

.vt-step-marker.active {
    border-color: var(--vt-primary-color);
    background: var(--vt-primary-color);
}

.vt-step-label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.vt-progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 600;
    color: var(--vt-dark-color);
}

/* Liste des trackings récents */
.vt-recent-trackings-list,
.vt-recent-trackings-grid {
    margin: 20px 0;
}

.vt-tracking-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid var(--vt-border-color);
    border-radius: var(--vt-border-radius);
    margin-bottom: 10px;
    align-items: center;
}

.vt-tracking-code {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vt-tracking-code strong {
    color: var(--vt-dark-color);
}

.vt-vehicle-info,
.vt-delivery-date {
    color: #666;
}

.vt-tracking-card {
    background: #fff;
    border: 1px solid var(--vt-border-color);
    border-radius: var(--vt-border-radius);
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--vt-transition);
}

.vt-tracking-card:hover {
    box-shadow: var(--vt-box-shadow);
    transform: translateY(-2px);
}

.vt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--vt-border-color);
}

.vt-card-header h4 {
    margin: 0;
    color: var(--vt-dark-color);
}

.vt-card-body p {
    margin: 8px 0;
    color: #666;
}

.vt-vehicle-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vt-vehicle-location .dashicons {
    color: var(--vt-primary-color);
}

.vt-card-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--vt-border-color);
    color: #666;
    font-size: 14px;
}

/* Messages */
.vt-info,
.vt-error {
    padding: 15px 20px;
    border-radius: var(--vt-border-radius);
    margin: 20px 0;
}

.vt-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.vt-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Utilitaires */
.vt-text-center {
    text-align: center;
}

.vt-mt-20 {
    margin-top: 20px;
}

.vt-mb-20 {
    margin-bottom: 20px;
}

.vt-hidden {
    display: none !important;
}

/* Animations */
@keyframes vt-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--vt-primary-color-rgb, 0, 115, 170), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--vt-primary-color-rgb, 0, 115, 170), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--vt-primary-color-rgb, 0, 115, 170), 0);
    }
}

.vt-pulse {
    animation: vt-pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .vt-tracking-header {
        padding: 20px;
    }
    
    .vt-tracking-header h2 {
        font-size: 1.5rem;
    }
    
    .vt-tracking-tabs {
        flex-wrap: wrap;
        padding: 0 20px;
    }
    
    .vt-tab {
        flex: 1 0 auto;
        padding: 12px 15px;
        font-size: 14px;
        text-align: center;
    }
    
    .vt-tab-content {
        padding: 20px;
    }
    
    .vt-info-grid {
        grid-template-columns: 1fr;
    }
    
    .vt-tracking-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .vt-vehicle-details {
        grid-template-columns: 1fr;
    }
    
    .vt-progress-labels {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .vt-progress-labels span {
        flex: 0 0 calc(50% - 5px);
        text-align: left;
    }
}

@media (max-width: 480px) {
    .vt-tracking-container {
        padding: 10px;
    }
    
    .vt-tracking-details {
        margin: 15px 0;
    }
    
    .vt-tab {
        flex: 1 0 100%;
    }
    
    .vt-progress-labels span {
        flex: 0 0 100%;
    }
}