/* Barre de notification de vérification VIN */
.vin-verification-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #237CFF 0%, #1a5fcc 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: space-between;
    animation: slideUp 0.3s ease-out;
}

.vin-verification-bar.show {
    display: flex;
}

.vin-verification-bar.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.vin-verification-bar.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.vin-verification-bar.pending {
    background: linear-gradient(135deg, #237CFF 0%, #1a5fcc 100%);
}

.vin-verification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.vin-verification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vin-verification-icon.loading {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.vin-verification-icon.loading::before {
    display: none;
}

.vin-verification-icon.success::before {
    content: '✓';
    font-size: 24px;
    display: inline-block;
    color: white;
    line-height: 24px;
    width: 24px;
    height: 24px;
    text-align: center;
}

.vin-verification-icon.error::before {
    content: '✕';
    font-size: 24px;
    display: inline-block;
    color: white;
    line-height: 1;
    vertical-align: middle;
    width: 24px;
    height: 24px;
    text-align: center;
}

.vin-verification-message {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.vin-verification-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.vin-verification-retry {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.vin-verification-retry:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.vin-verification-retry:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vin-verification-cancel {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.vin-verification-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.vin-verification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.vin-verification-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Popup de confirmation pour annuler la vérification */
.vin-cancel-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.vin-cancel-confirm-box {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.vin-cancel-confirm-box p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #333;
}

.vin-cancel-confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.vin-cancel-confirm-buttons button {
    padding: 0.5rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.vin-cancel-confirm-yes {
    background-color: #dc3545;
    color: white;
}

.vin-cancel-confirm-yes:hover {
    background-color: #c82333;
}

.vin-cancel-confirm-yes:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vin-cancel-confirm-no {
    background-color: #6c757d;
    color: white;
}

.vin-cancel-confirm-no:hover {
    background-color: #5a6268;
}

/* Ajuster le padding du body pour éviter que le contenu soit caché par la barre */
body.has-vin-notification {
    padding-bottom: 70px;
}

/* Responsive */
@media (max-width: 768px) {
    .vin-verification-bar {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .vin-verification-content {
        width: 100%;
    }
    
    .vin-verification-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .vin-verification-retry {
        flex: 1;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .vin-verification-cancel {
        flex: 1;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .vin-verification-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    body.has-vin-notification {
        padding-bottom: 110px;
    }
}
