/* ============================================================
   Voice AI Pricing Table v2 – Frontend Styles
   All colours driven by CSS custom properties set by PHP
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* ── Wrapper ── */
.vaip-wrapper {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    margin: 0 auto;
    max-width: 1200px;
    /* padding injected via inline style from PHP settings */
}

/* ============================================================
   TAB BAR
   ============================================================ */
.vaip-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    /* justify-content injected inline from PHP alignment setting */
}

/* ── Tab Button ── */
.vaip-tab {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 130px;
    padding: var(--vaip-tab-pv, 14px) var(--vaip-tab-ph, 28px);
    border: 2px solid transparent;
    border-radius: var(--vaip-tab-radius, 12px);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: var(--vaip-tab-inactive-bg, rgba(255,255,255,0.06));
    color: var(--vaip-tab-inactive-color, rgba(255,255,255,0.65));
    backdrop-filter: blur(8px);
    transition: background 0.25s ease, color 0.25s ease,
                transform 0.22s ease, box-shadow 0.25s ease;
    outline: none;
    text-align: center;
    line-height: 1.3;
}

.vaip-tab:hover:not(.vaip-tab--active) {
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.22);
}

.vaip-tab:focus-visible {
    outline: 3px solid rgba(123,47,247,0.6);
    outline-offset: 2px;
}

/* Active tab */
.vaip-tab--active {
    background: var(--vaip-tab-active-grad, linear-gradient(135deg,#e60023 0%,#7b2ff7 100%));
    color: var(--vaip-tab-active-color, #fff) !important;
    border-color: transparent;
    box-shadow: var(--vaip-tab-active-shadow, 0 8px 40px rgba(230,0,35,0.35));
    transform: translateY(-3px);
}

/* Featured glow ring */
.vaip-tab--featured::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: calc(var(--vaip-tab-radius, 12px) + 4px);
    background: var(--vaip-tab-active-grad, linear-gradient(135deg,#e60023 0%,#7b2ff7 100%));
    opacity: 0.22;
    z-index: -1;
    filter: blur(7px);
    pointer-events: none;
}

.vaip-tab__title { line-height: 1.2; }

.vaip-tab__badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    background: var(--vaip-badge-bg, rgba(255,255,255,0.22));
    color: var(--vaip-badge-color, inherit);
}

/* ============================================================
   PANELS
   ============================================================ */
.vaip-panel {
    background: var(--vaip-card-bg, #13132a);
    border-radius: var(--vaip-card-radius, 20px);
    box-shadow: var(--vaip-card-shadow, 0 8px 40px rgba(230,0,35,0.18));
    overflow: hidden;
    animation: vaipIn 0.3s cubic-bezier(0.4,0,0.2,1) forwards;
}

.vaip-panel--hidden { display: none; }

/* Featured border */
.vaip-panel--featured {
    position: relative;
    isolation: isolate;
}
.vaip-panel--featured::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--vaip-card-radius,20px) + 2px);
    background: var(--vaip-tab-active-grad, linear-gradient(135deg,#e60023 0%,#7b2ff7 100%));
    z-index: -1;
}

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

/* ============================================================
   TABLE
   ============================================================ */
.vaip-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vaip-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 540px;
    color: var(--vaip-table-text-color, #e8e8f0);
    font-size: 14px;
}

/* Header */
.vaip-table thead tr {
    background: var(--vaip-acc-grad, linear-gradient(90deg,#e60023 0%,#7b2ff7 100%));
}

.vaip-th {
    padding: 16px 22px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--vaip-table-header-color, #fff);
    border: none;
    white-space: nowrap;
}
.vaip-th--feat { text-align: left; min-width: 190px; }

/* First/last th radius */
.vaip-table thead tr th:first-child { border-radius: 0; }
.vaip-table thead tr th:last-child  { border-radius: 0; }

/* Body rows */
.vaip-tr--even { background: var(--vaip-row-even-bg, rgba(255,255,255,0.03)); }
.vaip-tr--odd  { background: var(--vaip-row-odd-bg,  rgba(0,0,0,0.12)); }

.vaip-tr { transition: background 0.15s ease; }
.vaip-tr:hover { background: var(--vaip-row-hover-bg, rgba(255,255,255,0.07)) !important; }

.vaip-td {
    padding: 14px 22px;
    text-align: center;
    border-bottom: 1px solid var(--vaip-border-color, rgba(255,255,255,0.05));
    vertical-align: middle;
}

.vaip-td--feat {
    text-align: left;
    font-weight: 500;
    color: var(--vaip-table-feature-color, #d0d0e8);
}

.vaip-icon {
    display: inline-block;
    margin-right: 7px;
    font-size: 15px;
    vertical-align: middle;
}

/* Yes/No */
.vaip-td--yes { color: var(--vaip-yes-color, #4ade80); font-weight: 700; font-size: 16px; }
.vaip-td--no  { color: var(--vaip-no-color,  rgba(255,255,255,0.2)); font-size: 16px; }

/* Last row – no border */
.vaip-tr:last-child .vaip-td { border-bottom: none; }

/* Empty state */
.vaip-empty {
    text-align: center;
    padding: 44px 20px;
    color: rgba(255,255,255,0.3);
    font-size: 15px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
    .vaip-tab { min-width: 90px; font-size: 13px; }
    .vaip-th, .vaip-td { padding: 11px 12px; font-size: 13px; }
}
@media (max-width: 420px) {
    .vaip-tab { min-width: 72px; font-size: 12px; }
}
