/**
 * CBWhatsAppCommerce - Styles E-Commerce & Widget Flottant
 * Inspiré des meilleures boutiques en ligne (Maison BCS, Alibaba, WhatsApp Business)
 */

/* Container des boutons d'action WhatsApp sur la fiche produit */
.cb-wa-actions-wrapper {
    margin: 12px 0;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.cb-wa-actions-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cb-wa-actions-title i {
    color: #25D366;
    font-size: 15px;
}

.cb-wa-buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Bouton Principal : Commander sur WhatsApp */
.cb-wa-btn-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    padding: 9px 15px;
    border-radius: 6px;
    text-decoration: none !important;
    border: none;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.cb-wa-btn-order:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    background: linear-gradient(135deg, #22bf5b 0%, #0d7065 100%);
    color: #ffffff !important;
}

.cb-wa-btn-order i {
    font-size: 16px;
}

/* Rangée Secondaire : Discuter + Appeler */
.cb-wa-secondary-row {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.cb-wa-btn-chat {
    flex: 1 1 120px;
    min-width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ffffff;
    color: #128C7E !important;
    border: 1px solid #25D366;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.cb-wa-btn-chat:hover {
    background: #e8f8f0;
    border-color: #128C7E;
    color: #075E54 !important;
}

.cb-wa-btn-call {
    flex: 1 1 100px;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #0a2e63;
    color: #ffffff !important;
    border: 1px solid #0a2e63;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.cb-wa-btn-call:hover {
    background: #0f3f85;
    color: #ffffff !important;
}

/* Note informative sous les boutons */
.cb-wa-notice {
    font-size: 10.5px;
    color: #64748b;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.cb-wa-status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: cb-wa-pulse-dot 2s infinite;
}

@keyframes cb-wa-pulse-dot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   WIDGET FLOTTANT WHATSAPP (Sur toutes les pages)
   ========================================================================== */
.cb-wa-floating-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cb-wa-floating-container.bottom-left {
    right: auto;
    left: 25px;
}

.cb-wa-floating-btn {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 30px;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.cb-wa-floating-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    color: #ffffff !important;
}

.cb-wa-floating-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Bulle d'infobulle d'accueil flottante */
.cb-wa-popup-bubble {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 290px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: none;
    animation: cb-wa-slide-up 0.3s ease;
}

.cb-wa-floating-container.bottom-left .cb-wa-popup-bubble {
    right: auto;
    left: 0;
}

@keyframes cb-wa-slide-up {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.cb-wa-popup-header {
    background: #075E54;
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cb-wa-popup-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-wa-popup-avatar {
    width: 36px;
    height: 36px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
}

.cb-wa-popup-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.cb-wa-popup-subtitle {
    font-size: 11px;
    color: #dcfce7;
}

.cb-wa-popup-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.8;
}

.cb-wa-popup-close:hover {
    opacity: 1;
}

.cb-wa-popup-body {
    padding: 16px;
    background: #f0f2f5;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 16px 16px;
}

.cb-wa-chat-bubble {
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 10px 10px 10px 2px;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
}

.cb-wa-chat-time {
    font-size: 10px;
    color: #94a3b8;
    text-align: right;
    margin-top: 4px;
}

.cb-wa-popup-footer {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.cb-wa-popup-start-btn {
    display: block;
    width: 100%;
    background: #25D366;
    color: #ffffff !important;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.cb-wa-popup-start-btn:hover {
    background: #128C7E;
}
