/* ============================================================
   Pricing Table Plugin — Frontend CSS
   RGPD: sem cookies, sem rastreamento, sem chamadas externas
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── Variáveis por skin ──────────────────────────────────── */
.ptpl-skin-blue  { --ptpl-accent:#2563eb; --ptpl-accent-dark:#1d4ed8; --ptpl-featured:#1e3a8a; --ptpl-check:#2563eb; --ptpl-ribbon:#2563eb; }
.ptpl-skin-purple{ --ptpl-accent:#7c3aed; --ptpl-accent-dark:#6d28d9; --ptpl-featured:#2e1065; --ptpl-check:#7c3aed; --ptpl-ribbon:#7c3aed; }
.ptpl-skin-green { --ptpl-accent:#059669; --ptpl-accent-dark:#047857; --ptpl-featured:#064e3b; --ptpl-check:#059669; --ptpl-ribbon:#059669; }
.ptpl-skin-red   { --ptpl-accent:#dc2626; --ptpl-accent-dark:#b91c1c; --ptpl-featured:#7f1d1d; --ptpl-check:#dc2626; --ptpl-ribbon:#dc2626; }

/* ── Base variáveis (light mode) ─────────────────────────── */
.ptpl-wrap {
    --ptpl-bg:          #f4f6fa;
    --ptpl-card-bg:     #ffffff;
    --ptpl-border:      #e2e8f0;
    --ptpl-text:        #1a202c;
    --ptpl-text-sub:    #64748b;
    --ptpl-check-free:  #94a3b8;
    --ptpl-btn-ghost-bg:#e2e8f0;
    --ptpl-btn-ghost-c: #64748b;
    --ptpl-radius:      16px;
    --ptpl-shadow:      0 4px 24px rgba(30,58,138,.08);
    --ptpl-shadow-feat: 0 8px 48px rgba(30,58,138,.22);
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--ptpl-bg);
    padding: 40px 16px 60px;
    box-sizing: border-box;
}

/* ── Dark mode ───────────────────────────────────────────── */
.ptpl-wrap.ptpl--dark {
    --ptpl-bg:       #0f172a;
    --ptpl-card-bg:  #1e293b;
    --ptpl-border:   #334155;
    --ptpl-text:     #f1f5f9;
    --ptpl-text-sub: #94a3b8;
}

/* ── Títulos ─────────────────────────────────────────────── */
.ptpl-title {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    text-align: center;
    color: var(--ptpl-text);
    margin: 0 0 8px;
    letter-spacing: -.02em;
}
.ptpl-subtitle {
    text-align: center;
    color: var(--ptpl-text-sub);
    font-size: 15px;
    margin: 0 0 36px;
}

/* ── Grid ────────────────────────────────────────────────── */
.ptpl-grid {
    display: grid;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.ptpl-cols-1 { grid-template-columns: 1fr; max-width: 320px; }
.ptpl-cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 680px; }
.ptpl-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ptpl-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 860px) {
    .ptpl-cols-3, .ptpl-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .ptpl-cols-2, .ptpl-cols-3, .ptpl-cols-4 { grid-template-columns: 1fr; }
}

/* ── Card ────────────────────────────────────────────────── */
.ptpl-card {
    background: var(--ptpl-card-bg);
    border: 1.5px solid var(--ptpl-border);
    border-radius: var(--ptpl-radius);
    padding: 28px 22px;
    position: relative;
    overflow: visible;
    box-shadow: var(--ptpl-shadow);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
    animation: ptpl-fadeup .5s ease both;
}
.ptpl-card:nth-child(1) { animation-delay: .05s; }
.ptpl-card:nth-child(2) { animation-delay: .12s; }
.ptpl-card:nth-child(3) { animation-delay: .19s; }
.ptpl-card:nth-child(4) { animation-delay: .26s; }

@keyframes ptpl-fadeup {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ptpl-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(30,58,138,.13); }

/* Card destaque */
.ptpl-card--featured {
    background: var(--ptpl-featured);
    border-color: var(--ptpl-featured);
    box-shadow: var(--ptpl-shadow-feat);
    transform: scale(1.035);
    z-index: 2;
}
.ptpl-card--featured:hover { transform: scale(1.035) translateY(-4px); }

/* ── Ribbon ──────────────────────────────────────────────── */
.ptpl-ribbon {
    position: absolute;
    top: -1px; right: -1px;
    background: var(--ptpl-ribbon);
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 0 var(--ptpl-radius) 0 var(--ptpl-radius);
}
.ptpl-card--featured .ptpl-ribbon { background: #60a5fa; color: var(--ptpl-featured); }

/* ── Imagem ──────────────────────────────────────────────── */
.ptpl-card-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
    display: block;
}

/* ── Nome do plano ───────────────────────────────────────── */
.ptpl-plan-name {
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--ptpl-accent);
    margin-bottom: 10px;
}
.ptpl-card--featured .ptpl-plan-name { color: #93c5fd; }

/* ── Preço ───────────────────────────────────────────────── */
.ptpl-price {
    font-family: 'Sora', sans-serif;
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: var(--ptpl-text);
    letter-spacing: -.03em;
}
.ptpl-card--featured .ptpl-price { color: #fff; }
.ptpl-price sup { font-size: 22px; font-weight: 700; vertical-align: super; }

.ptpl-period {
    font-size: 12px;
    color: var(--ptpl-text-sub);
    margin-top: 4px;
    margin-bottom: 18px;
    line-height: 1.4;
}
.ptpl-card--featured .ptpl-period { color: #93c5fd; }

/* ── Botão ───────────────────────────────────────────────── */
.ptpl-btn {
    display: block;
    width: 100%;
    padding: 11px 0;
    text-align: center;
    border-radius: calc(var(--ptpl-radius) / 2);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, color .15s, transform .12s, border-color .15s;
    margin-bottom: 4px;
}
.ptpl-btn:hover { transform: scale(1.02); }

.ptpl-btn--solid   { background: var(--ptpl-accent); color: #fff; }
.ptpl-btn--solid:hover { background: var(--ptpl-accent-dark); }

.ptpl-btn--ghost   { background: var(--ptpl-btn-ghost-bg); color: var(--ptpl-btn-ghost-c); }
.ptpl-btn--ghost:hover { background: #cbd5e1; }

.ptpl-btn--outline { background: transparent; color: var(--ptpl-accent); border-color: var(--ptpl-accent); }
.ptpl-btn--outline:hover { background: var(--ptpl-accent); color: #fff; }

.ptpl-card--featured .ptpl-btn--solid   { background: #fff; color: var(--ptpl-featured); }
.ptpl-card--featured .ptpl-btn--solid:hover { background: #e0f2fe; }

.ptpl-btn-note {
    font-size: 11px;
    color: var(--ptpl-text-sub);
    text-align: center;
    margin-bottom: 18px;
}
.ptpl-card--featured .ptpl-btn-note { color: #93c5fd; }

/* ── Separador ───────────────────────────────────────────── */
.ptpl-sep {
    border: none;
    border-top: 1px solid var(--ptpl-border);
    margin: 0 0 16px;
}
.ptpl-card--featured .ptpl-sep { border-color: rgba(255,255,255,.15); }

/* ── Features ────────────────────────────────────────────── */
.ptpl-features {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.ptpl-feat {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    color: var(--ptpl-text);
    line-height: 1.4;
}
.ptpl-card--featured .ptpl-feat { color: #e0f2fe; }

.ptpl-feat-icon {
    flex-shrink: 0;
    color: var(--ptpl-check);
    margin-top: 2px;
}
.ptpl-card--featured .ptpl-feat-icon { color: #60a5fa; }

/* Ícone cinza para coluna gratuita (se necessário via JS) */
.ptpl-feat-icon--muted { color: var(--ptpl-check-free); }

.ptpl-feat strong { font-weight: 700; }

/* ── Tooltip ─────────────────────────────────────────────── */
.ptpl-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px; height: 15px;
    background: var(--ptpl-border);
    color: var(--ptpl-text-sub);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
    position: relative;
}
.ptpl-tip:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%; top: -38px;
    transform: translateX(-50%);
    background: #1e293b;
    color: #e2e8f0;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 99;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.ptpl-card--featured .ptpl-tip { background: rgba(255,255,255,.15); color: #93c5fd; }
