@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Outer grid ── */
.pt-pricing-wrap {
    display: grid;
    gap: 20px;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    /* subgrid: cards share row heights */
    align-items: stretch;
}

.pt-cols-1 { grid-template-columns: minmax(0,480px); }
.pt-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pt-cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.pt-cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.pt-cols-5 { grid-template-columns: repeat(5,minmax(0,1fr)); }

@media (max-width:1100px){ .pt-cols-5{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:860px) { .pt-cols-3,.pt-cols-4,.pt-cols-5{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px) { .pt-pricing-wrap{ grid-template-columns:minmax(0,1fr) !important; } }

/* ── Card — itself a grid with subgrid rows ── */
.pt-card {
    --pt-accent: #6c63ff;
    position: relative;
    background: #fff;
    border: 1.5px solid #e8e8f0;
    border-radius: 14px;
    padding: 0;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    width: 100%;
    min-width: 0;          /* CRITICAL: prevents overflow out of grid cell */
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    box-shadow: 0 3px 16px rgba(0,0,0,.06);
}
.pt-card::before {
    content:''; position:absolute; top:0; left:0; right:0;
    height:3px; background:var(--pt-accent); border-radius:14px 14px 0 0;
    z-index:1;
}
.pt-card:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(0,0,0,.11); }
.pt-card.pt-featured { border-color:var(--pt-accent); border-width:2px; }

/* Badge */
.pt-badge {
    position:absolute; top:12px; right:0;
    background:var(--pt-accent); color:#fff;
    font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
    padding:3px 10px 3px 8px; border-radius:20px 0 0 20px; white-space:nowrap; z-index:2;
}

/* Card sections */
.pt-card-top {
    padding: 22px 18px 0;
    margin-bottom: 14px;
}
.pt-plan-name { font-size:15px; font-weight:700; color:#1a1a2e; margin:0 0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pt-price-row { display:flex; align-items:baseline; gap:1px; }
.pt-price    { font-size:32px; font-weight:800; color:var(--pt-accent); line-height:1; }
.pt-currency { font-size:16px; font-weight:700; color:var(--pt-accent); align-self:flex-start; margin-top:3px; }
.pt-period   { font-size:11px; color:#999; margin-left:3px; align-self:flex-end; padding-bottom:2px; white-space:nowrap; }

/* ── Features — subgrid so rows align across all cards ── */
.pt-features {
    list-style: none;
    padding: 0 18px;
    margin: 0;
    /* participate in the outer grid's row axis */
    display: grid;
    /* one row per feature item — all cards share the same implicit row tracks */
    grid-auto-rows: auto;
    align-content: start;
    grid-row: 3;  /* sits in the stretchy middle row */
    align-self: stretch;
}

.pt-features li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    line-height: 1.4;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f7;
    color: #444;
}
.pt-features li:last-child { border-bottom:none; }
.pt-features li.pt-no { color:#bbb; }

.pt-feat-text { flex:1; min-width:0; word-break:break-word; }

.pt-icon {
    display:inline-flex; align-items:center; justify-content:center;
    width:16px; height:16px; min-width:16px;
    border-radius:50%; font-size:9px; font-weight:700; flex-shrink:0;
}
.pt-yes .pt-icon { background:color-mix(in srgb,var(--pt-accent) 15%,transparent); color:var(--pt-accent); }
.pt-no  .pt-icon { background:#f0f0f0; color:#ccc; }

/* Feature tooltip — custom styled bubble (no native title tooltip) */
.pt-info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-left: 2px;
    font-size: 12px;
    line-height: 1;
    color: #bbb;
    cursor: help;
}
.pt-info-icon:hover,
.pt-info-icon:focus {
    color: var(--pt-accent);
    outline: none;
}

.pt-tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -6px;
    width: 333px;
    max-width: 70vw;
    padding: 10px 14px;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 12px 28px rgba(15,23,42,.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
    z-index: 50;
    pointer-events: none;
}
.pt-tooltip-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 10px;
    width: 10px;
    height: 10px;
    background: #0f172a;
    transform: translateY(-50%) rotate(45deg);
}

.pt-info-icon:hover .pt-tooltip-bubble,
.pt-info-icon:focus .pt-tooltip-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 520px) {
    .pt-tooltip-bubble { right: -40px; width: 200px; }
}

/* CTA */
.pt-cta-btn {
    display:block; text-align:center;
    background:var(--pt-accent); color:#fff !important;
    font-size:12px; font-weight:700;
    padding:11px 10px; border-radius:0 0 12px 12px;
    margin: 14px 18px 18px;
    text-decoration:none !important;
    transition:filter .2s,transform .15s;
    box-shadow:0 3px 10px color-mix(in srgb,var(--pt-accent) 35%,transparent);
    border-radius: 9px;
}
.pt-cta-btn:hover { filter:brightness(1.1); transform:translateY(-1px); }

/* ── Payment badges ── */
.pt-payment-badges {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0 18px 16px;
}
.pt-secure { font-size: 10px; color: #aaa; font-weight: 500; }
.pt-payment-icons { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.pt-pay-icon { width: 36px; height: 12px; border-radius: 2px; opacity: .7; transition: opacity .2s; flex-shrink: 0; }
.pt-pay-icon:hover { opacity: 1; }
