/**
 * DRIP DKR - Delivery Info Popup
 * Styles CSS avec charte graphique DRIP DKR simplifiée
 * 
 * Couleurs:
 * - Almond (Primaire): #F1DABF
 * - Snow (Secondaire): #FFFBFF
 */

/* === OVERLAY === */
.drip-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999999;
    animation: fadeIn 0.2s ease-out;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === CONTAINER === */
.drip-popup-container {
    background: #FFFBFF;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(241, 218, 191, 0.4);
    max-width: 480px;
    width: 100%;
    border: 2px solid #F1DABF;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

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

/* === HEADER === */
.drip-popup-header {
    background: #F1DABF;
    color: #333;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drip-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #333;
}

.drip-popup-close {
    background: rgba(255, 251, 255, 0.5);
    border: none;
    color: #333;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.drip-popup-close:hover {
    background: rgba(255, 251, 255, 0.8);
    transform: rotate(90deg);
}

.drip-popup-close svg {
    width: 20px;
    height: 20px;
}

/* === FORM === */
.drip-popup-form {
    padding: 24px;
}

.drip-popup-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* === FORM GROUPS === */
.drip-form-group {
    margin-bottom: 20px;
}

/* Grille pour prénom et nom côte à côte */
.drip-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .drip-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.drip-form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.drip-form-group label svg {
    width: 16px;
    height: 16px;
    color: #F1DABF;
}

.drip-form-group input[type="tel"],
.drip-form-group input[type="text"],
.drip-form-group input[type="email"],
.drip-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #F1DABF;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background: #FFFBFF;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.drip-form-group input[type="tel"]:focus,
.drip-form-group input[type="text"]:focus,
.drip-form-group input[type="email"]:focus,
.drip-form-group select:focus {
    outline: none;
    border-color: #F1DABF;
    box-shadow: 0 0 0 3px rgba(241, 218, 191, 0.3);
}

.drip-form-group input[type="tel"]::placeholder,
.drip-form-group input[type="text"]::placeholder,
.drip-form-group input[type="email"]::placeholder {
    color: #999;
}

.drip-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.drip-form-group select option {
    padding: 10px;
}

.drip-form-group select optgroup {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    background: #FFF8F0;
    padding: 8px 0;
}

.drip-form-group select optgroup option {
    font-weight: 400;
    color: #666;
    padding-left: 20px;
}

/* Styles d'erreur */
.drip-form-group input.drip-error {
    border-color: #dc2626;
    background: #fef2f2;
}

.drip-error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

/* === REMEMBER ME === */
.drip-remember-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(241, 218, 191, 0.2);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(241, 218, 191, 0.5);
    margin-bottom: 20px;
}

.drip-remember-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #F1DABF;
    flex-shrink: 0;
}

.drip-remember-wrapper label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}

/* === BUTTONS WRAPPER === */
.drip-buttons-wrapper {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

@media (max-width: 480px) {
    .drip-buttons-wrapper {
        flex-direction: column;
    }
}

/* === BUTTONS === */
.drip-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

/* Bouton secondaire - Ajouter des produits */
.drip-btn-secondary {
    background: #FFFBFF;
    color: #333;
    border: 2px solid #F1DABF;
}

.drip-btn-secondary:hover {
    background: rgba(241, 218, 191, 0.2);
    border-color: #E5CEAF;
}

/* Bouton primaire - Finaliser ma commande */
.drip-btn-primary {
    background: #F1DABF;
    color: #333;
    box-shadow: 0 4px 12px rgba(241, 218, 191, 0.3);
}

.drip-btn-primary:hover {
    background: #E5CEAF;
    box-shadow: 0 6px 20px rgba(241, 218, 191, 0.4);
    transform: translateY(-2px);
}

.drip-btn-primary:active {
    transform: translateY(0);
}

.drip-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === LOADING STATE === */
.drip-btn.loading {
    position: relative;
    color: transparent;
}

.drip-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(51, 51, 51, 0.2);
    border-radius: 50%;
    border-top-color: #333;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .drip-popup-overlay {
        padding: 16px;
    }
    
    .drip-popup-container {
        border-radius: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .drip-popup-header {
        padding: 20px;
    }
    
    .drip-popup-header h3 {
        font-size: 18px;
    }
    
    .drip-popup-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .drip-popup-overlay {
        padding: 12px;
        align-items: center;
    }
    
    .drip-popup-container {
        border-radius: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* === ANIMATIONS SUPPLÉMENTAIRES === */
.drip-popup-container * {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling pour mobile */
.drip-popup-container {
    -webkit-overflow-scrolling: touch;
}

/* Focus visible pour l'accessibilité */
input:focus-visible,
button:focus-visible {
    outline: 2px solid #F1DABF;
    outline-offset: 2px;
}
