/* ── WooCommerce WhatsApp Checkout — Floating Button v4 ── */

#wc-wa-float-wrap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    display: none; /* JS shows it when cart has items */
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* ── Pill button ── */
#wc-wa-float-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 0 14px;
    height: 52px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.22);
    transition: transform 0.18s, box-shadow 0.18s;
    white-space: nowrap;
    position: relative;
}
#wc-wa-float-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0,0,0,0.28);
}
#wc-wa-float-pill:active { transform: scale(0.97); }

#wc-wa-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Cart item count badge */
#wc-wa-float-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: #fff;
    color: #1C4D35;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
#wc-wa-float-badge.visible { display: flex; }

/* ── Expanded panel ── */
#wc-wa-float-panel {
    width: 310px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    overflow: hidden;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.07);
    animation: wc-wa-slide-up 0.22s ease;
}
#wc-wa-float-panel.open { display: flex; }

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

#wc-wa-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #112B1E;
    color: #fff;
}
#wc-wa-panel-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
#wc-wa-panel-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
#wc-wa-panel-close:hover { color: #fff; }

#wc-wa-panel-items {
    padding: 12px 16px;
    max-height: 220px;
    overflow-y: auto;
    border-bottom: 1px solid #F2EAD8;
}

.wc-wa-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #F2EAD8;
    font-size: 13px;
}
.wc-wa-item-row:last-child { border-bottom: none; }
.wc-wa-item-name {
    color: #2A1A0C;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}
.wc-wa-item-qty {
    color: #7A6A55;
    font-size: 12px;
    margin-top: 2px;
}
.wc-wa-item-price {
    color: #1C4D35;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

#wc-wa-panel-totals {
    padding: 10px 16px 4px;
    font-size: 13px;
}
.wc-wa-total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: #7A6A55;
}
.wc-wa-total-row.grand {
    border-top: 1.5px solid #F2EAD8;
    margin-top: 6px;
    padding-top: 8px;
    color: #2A1A0C;
    font-weight: 700;
    font-size: 14px;
}
.wc-wa-total-row.grand span:last-child { color: #1C4D35; }

#wc-wa-panel-send {
    margin: 12px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 8px;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
#wc-wa-panel-send:hover  { opacity: 0.92; transform: translateY(-1px); }
#wc-wa-panel-send:active { transform: scale(0.98); }

#wc-wa-panel-cart-link {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #1C4D35;
    text-decoration: none;
    padding: 0 16px 14px;
    opacity: 0.8;
}
#wc-wa-panel-cart-link:hover { opacity: 1; text-decoration: underline; }

/* ── Checkout page static button ── */
#wc-wa-place-order,
#wc-wa-cart-btn {
    transition: opacity 0.2s, transform 0.15s !important;
}
#wc-wa-place-order:hover,
#wc-wa-cart-btn:hover {
    opacity: 0.92 !important;
    transform: translateY(-2px) !important;
}

/* Mobile tweaks */
@media (max-width: 480px) {
    #wc-wa-float-wrap { bottom: 18px; right: 16px; }
    #wc-wa-float-panel { width: calc(100vw - 32px); }
    #wc-wa-float-label { display: none; }
    #wc-wa-float-pill  { padding: 0 14px; }
}
