/* Trial page — Pro trial overview at /trial */

.trial-page {
    min-height: calc(100dvh - 80px);
    background: #0d0d0d;
    padding: 32px 16px 64px;
}
.trial-page-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trial-card {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
}
.trial-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.trial-card-header h2 {
    margin: 0;
    font-size: 16px;
    color: #ddd;
    font-weight: 600;
}
.trial-card-header h2 i { color: #4a9eff; }

.trial-loading,
.trial-error {
    padding: 32px;
    text-align: center;
    color: #888;
}
.trial-error { color: #e74c3c; }

/* ── Hero: empty state (no trial) ─────────────────────────────────────────── */

.trial-hero-empty {
    padding: 48px 24px;
    text-align: center;
}
.trial-hero-empty .trial-hero-icon {
    font-size: 56px;
    color: #4a9eff;
    margin-bottom: 16px;
}
.trial-hero-empty h1 {
    margin: 0 0 12px;
    font-size: 28px;
    color: #fff;
    font-weight: 700;
}
.trial-hero-sub {
    color: #aaa;
    font-size: 16px;
    max-width: 580px;
    margin: 0 auto 24px;
    line-height: 1.5;
}
.trial-hero-fine {
    color: #777;
    font-size: 13px;
    margin: 16px 0 0;
}

/* ── Hero: active trial ───────────────────────────────────────────────────── */

.trial-hero-active {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 8px;
}
.trial-ring-wrap {
    flex: 0 0 200px;
}
.trial-ring {
    width: 200px;
    height: 200px;
    display: block;
}
.trial-hero-body {
    flex: 1;
    min-width: 280px;
}
.trial-hero-body h1 {
    margin: 8px 0 12px;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
}
.trial-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 158, 255, 0.12);
    color: #4a9eff;
    border: 1px solid rgba(74, 158, 255, 0.35);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.trial-hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ── Hero: completed (purchased / expired / revoked) ──────────────────────── */

.trial-hero-completed {
    padding: 48px 24px;
    text-align: center;
}
.trial-hero-completed .trial-hero-icon {
    font-size: 56px;
    margin-bottom: 16px;
}
.trial-hero-completed h1 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
}

/* ── Turnstile widget slot ────────────────────────────────────────────────── */

.trial-turnstile-slot {
    display: flex;
    justify-content: center;
    margin: 0 auto 16px;
    min-height: 65px;        /* reserves space so the page doesn't jump when the widget renders */
}
/* Cloudflare widget itself comes in as an iframe — center it cleanly. */
.trial-turnstile-slot > div { margin: 0 auto; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.trial-btn-primary,
.trial-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.trial-btn-primary {
    background: #4a9eff;
    color: #fff;
}
.trial-btn-primary:hover:not(:disabled) {
    background: #3a8eef;
}
.trial-btn-primary:disabled {
    background: #2a4a6a;
    cursor: not-allowed;
}
.trial-btn-secondary {
    background: #2a2a2a;
    color: #ddd;
    border: 1px solid #3a3a3a;
}
.trial-btn-secondary:hover:not(:disabled) {
    background: #333;
}

/* ── Milestones ───────────────────────────────────────────────────────────── */

.trial-milestones {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.trial-milestone {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
}
.trial-milestone.done {
    background: rgba(62, 207, 142, 0.06);
    border-color: rgba(62, 207, 142, 0.3);
}
.trial-milestone-icon {
    flex: 0 0 36px;
    height: 36px;
    width: 36px;
    border-radius: 8px;
    background: #2a2a2a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #888;
}
.trial-milestone.done .trial-milestone-icon {
    background: rgba(62, 207, 142, 0.15);
    color: #3ecf8e;
}
.trial-milestone-body {
    flex: 1;
    min-width: 0;
}
.trial-milestone-title {
    color: #ddd;
    font-weight: 600;
    font-size: 14px;
}
.trial-milestone.done .trial-milestone-title { color: #fff; }
.trial-milestone-sub {
    color: #888;
    font-size: 12px;
    margin-top: 2px;
}
.trial-milestone-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #4a9eff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
}
.trial-milestone-cta:hover {
    background: rgba(74, 158, 255, 0.1);
}

/* ── Activity charts (spark reuse) ────────────────────────────────────────── */

.trial-charts-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.trial-chart-col {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 12px;
}
.trial-chart-label {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    font-size: 12px;
    margin-bottom: 8px;
}
.trial-chart-label span:last-child { color: #fff; font-weight: 600; }

/* Sparks reuse the .usage-spark-* classes from usage.css. Provide fallback in
   case the sibling stylesheet isn't loaded for some reason. */
.trial-chart-col .usage-spark-empty {
    height: 32px;
    background: #222;
    border-radius: 4px;
}

/* ── Confetti canvas overlay ──────────────────────────────────────────────── */

.trial-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}

/* ── Global header trial banner ───────────────────────────────────────────── */

.trial-header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #2a4a78, #1d3a5c);
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid #1a2a3c;
}
.trial-header-banner:hover {
    background: linear-gradient(90deg, #305387, #20406b);
}
.trial-header-banner.urgent {
    background: linear-gradient(90deg, #8c2f2f, #6f2424);
    border-bottom-color: #5a1f1f;
}
.trial-header-banner.urgent:hover {
    background: linear-gradient(90deg, #a13a3a, #823030);
}
.trial-header-banner .thb-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
}
.trial-header-banner .thb-cta {
    margin-left: auto;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Subscriptions-page Start Trial card ──────────────────────────────────── */

.sub-trial-cta {
    background: linear-gradient(135deg, #1f3a5c, #1a2f4a);
    border: 1px solid #2a4a78;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.sub-trial-cta-text { flex: 1; min-width: 240px; }
.sub-trial-cta-text h3 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}
.sub-trial-cta-text p {
    margin: 0;
    color: #b0c4dc;
    font-size: 13px;
}
.sub-trial-cta-btn {
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}
.sub-trial-cta-btn:hover { background: #3a8eef; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .trial-page { padding: 16px 12px 48px; }
    .trial-card { padding: 16px; }
    .trial-hero-active { flex-direction: column; }
    .trial-ring-wrap { flex: 0 0 auto; }
    .trial-ring { width: 160px; height: 160px; }
    .trial-hero-body h1 { font-size: 20px; text-align: center; }
    .trial-hero-body { text-align: center; }
    .trial-hero-actions { justify-content: center; }
}
