﻿/**
 * VDG MultiBuy - Frontend Styles
 */

/* Container */
.vdg-multibuy-wrapper {
    margin: 24px 0;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    box-sizing: border-box;
}

.vdg-multibuy-wrapper *,
.vdg-multibuy-wrapper *::before,
.vdg-multibuy-wrapper *::after {
    box-sizing: border-box;
}

/* Header */
.vdg-multibuy-header {
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}

.vdg-multibuy-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vdg-multibuy-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #0284c7;
    border-radius: 2px;
}

/* Table Layout (Desktop) */
.vdg-multibuy-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.vdg-multibuy-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 0;
    background: transparent;
    border: none;
}

.vdg-multibuy-table thead th {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    background: transparent;
    text-align: left;
}

.vdg-multibuy-table thead th.vdg-th-cta {
    text-align: right;
}

.vdg-multibuy-row {
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.vdg-multibuy-row:hover {
    background: #f1f5f9;
}

.vdg-multibuy-row td {
    padding: 12px 14px;
    vertical-align: middle;
    border: none;
    color: #334155;
    font-size: 14px;
}

.vdg-multibuy-row td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.vdg-multibuy-row td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    text-align: right;
}

/* Special Vimido Highlight */
.vdg-multibuy-row.vdg-row-vimido {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.vdg-multibuy-row.vdg-row-vimido:hover {
    background: #dcfce7;
}

/* Channel Cell */
.vdg-channel-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.vdg-channel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vdg-channel-vimido .vdg-channel-indicator {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.vdg-channel-shopee .vdg-channel-indicator {
    background: #ee4d2d;
}

.vdg-channel-tiktok .vdg-channel-indicator {
    background: #000000;
}

.vdg-channel-lazada .vdg-channel-indicator {
    background: #0f146d;
}

.vdg-channel-name {
    color: #0f172a;
    font-size: 14px;
}

.vdg-badge-vimido {
    display: inline-block;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Offer Text */
.vdg-offer-text {
    font-size: 13px;
    color: #475569;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.vdg-row-vimido .vdg-offer-text {
    color: #166534;
    background: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* CTA Buttons */
.vdg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    min-height: 38px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Vimido Button */
.vdg-btn-vimido {
    background: #16a34a;
    color: #ffffff !important;
}

.vdg-btn-vimido:hover {
    background: #15803d;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
}

/* Shopee Button */
.vdg-btn-shopee {
    background: #ee4d2d;
    color: #ffffff !important;
}

.vdg-btn-shopee:hover {
    background: #d73211;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(238, 77, 45, 0.3);
}

/* TikTok Button */
.vdg-btn-tiktok {
    background: #0f172a;
    color: #ffffff !important;
}

.vdg-btn-tiktok:hover {
    background: #000000;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Lazada Button */
.vdg-btn-lazada {
    background: #0f146d;
    color: #ffffff !important;
}

.vdg-btn-lazada:hover {
    background: #080c46;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 20, 109, 0.3);
}

/* Demo # Button */
.vdg-btn-demo {
    background: #f1f5f9;
    color: #64748b !important;
    border: 1px dashed #cbd5e1;
}

.vdg-btn-demo:hover {
    background: #e2e8f0;
    color: #334155 !important;
}

/* Disclosure Footer */
.vdg-multibuy-disclosure {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.vdg-multibuy-disclosure p {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
    font-style: italic;
}

/* Toast / Tooltip Notification for Demo # */
.vdg-toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.vdg-toast-notice.vdg-show {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse animation on target cart form */
@keyframes vdgPulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.vdg-cart-highlight {
    animation: vdgPulseHighlight 1.5s ease-out;
    border-radius: 8px;
}

/* =========================================================
   RESPONSIVE DESIGN (Mobile Cards)
   ========================================================= */
@media screen and (max-width: 600px) {
    .vdg-multibuy-wrapper {
        padding: 14px 14px;
        margin: 18px 0;
        border-radius: 10px;
    }

    .vdg-multibuy-table,
    .vdg-multibuy-table thead,
    .vdg-multibuy-table tbody,
    .vdg-multibuy-table th,
    .vdg-multibuy-table td,
    .vdg-multibuy-table tr {
        display: block;
        width: 100%;
    }

    .vdg-multibuy-table thead {
        display: none; /* Hide header row on mobile */
    }

    .vdg-multibuy-row {
        margin-bottom: 12px;
        padding: 12px 14px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .vdg-multibuy-row td {
        padding: 0;
        text-align: left !important;
    }

    .vdg-multibuy-row td:first-child,
    .vdg-multibuy-row td:last-child {
        border-radius: 0;
    }

    .vdg-td-channel {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .vdg-td-offer {
        font-size: 12px;
    }

    .vdg-offer-text {
        padding: 3px 6px;
        font-size: 12px;
    }

    .vdg-td-cta {
        margin-top: 4px;
    }

    .vdg-btn {
        width: 100%;
        min-height: 44px; /* Mobile touch accessibility friendly */
        font-size: 14px;
    }
}