/**
 * Carmela Delivery Estimate - Front-end Styles
 * Design artisanal cohérent avec le thème
 */

.carmela-delivery-estimate {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #E8C4C4 0%, rgba(232, 196, 196, 0.5) 100%);
    border-radius: 12px;
    margin: 20px 0;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.carmela-delivery-estimate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.carmela-delivery-estimate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 165, 165, 0.3);
    border-color: #D4A5A5;
}

/* Icon */
.carmela-delivery-estimate__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: #4A4543;
    position: relative;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Content */
.carmela-delivery-estimate__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.carmela-delivery-estimate__text {
    font-family: 'Quicksand', 'Work Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #6B6563;
    letter-spacing: 0.01em;
}

.carmela-delivery-estimate__date {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 18px;
    font-weight: 700;
    color: #4A4543;
    letter-spacing: 0.02em;
}

/* Context variations */
.carmela-delivery-estimate[data-context="product"] {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    margin-top: 24px;
    margin-bottom: 24px;
}

.carmela-delivery-estimate[data-context="cart"] {
    margin: 16px 0;
    padding: 14px 18px;
}

.carmela-delivery-estimate[data-context="cart"] .carmela-delivery-estimate__icon {
    width: 24px;
    height: 24px;
}

.carmela-delivery-estimate[data-context="cart"] .carmela-delivery-estimate__text {
    font-size: 13px;
}

.carmela-delivery-estimate[data-context="cart"] .carmela-delivery-estimate__date {
    font-size: 16px;
}

.carmela-delivery-estimate[data-context="checkout"] {
    width: 100%;
    max-width: 100%;
    margin: 20px 0 30px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #7D9D74 0%, rgba(125, 157, 116, 0.8) 100%);
}

.carmela-delivery-estimate[data-context="checkout"] .carmela-delivery-estimate__icon {
    color: #fff;
}

.carmela-delivery-estimate[data-context="checkout"] .carmela-delivery-estimate__text {
    color: rgba(255, 255, 255, 0.9);
}

.carmela-delivery-estimate[data-context="checkout"] .carmela-delivery-estimate__date {
    color: #fff;
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .carmela-delivery-estimate {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .carmela-delivery-estimate__icon {
        width: 24px;
        height: 24px;
    }
    
    .carmela-delivery-estimate__text {
        font-size: 13px;
    }
    
    .carmela-delivery-estimate__date {
        font-size: 16px;
    }
    
    .carmela-delivery-estimate[data-context="checkout"] .carmela-delivery-estimate__date {
        font-size: 18px;
    }
}

/* Integration dans la page produit WooCommerce */
.woocommerce-product-details__short-description + .carmela-delivery-estimate,
.product_meta + .carmela-delivery-estimate {
    margin-top: 20px;
}

/* Animation au chargement */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carmela-delivery-estimate {
    animation: slideInUp 0.5s ease-out;
}

/* Accent artisanal avec bordure décorative */
.carmela-delivery-estimate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #D4A5A5 20%, #D4A5A5 80%, transparent 100%);
    opacity: 0.3;
}

/* Version compacte pour le floating cart si nécessaire */
.floating-cart .carmela-delivery-estimate {
    border-radius: 8px;
    padding: 12px 16px;
}

.floating-cart .carmela-delivery-estimate__content {
    flex-direction: row;
    gap: 6px;
    align-items: baseline;
}

.floating-cart .carmela-delivery-estimate__text::after {
    content: ':';
    margin-left: 2px;
}
