/* Customer-facing checkout + payment result pages */
.pay-wrap {
    max-width: 720px;
    margin: 32px auto;
    padding: 0 16px;
}

.pay-h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.pay-sub { color: #64748b; margin-bottom: 22px; }

.pay-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .pay-plans { grid-template-columns: 1fr; } }

.pay-plan {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
    background: #fff;
}
.pay-plan:hover { border-color: #cbd5e1; }
.pay-plan.is-selected { border-color: #059669; background: #f0fdf4; box-shadow: 0 0 0 3px rgba(5,150,105,.12); }
.pay-plan.is-disabled { opacity: .5; pointer-events: none; }

.pay-plan-name { font-size: 18px; font-weight: 800; }
.pay-plan-price { font-size: 30px; font-weight: 900; margin: 8px 0 2px; }
.pay-plan-price small { font-size: 15px; font-weight: 600; color: #64748b; }
.pay-plan-note { font-size: 13px; color: #94a3b8; }

.pay-qty-row { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; flex-wrap: wrap; }
.pay-qty-row label { font-weight: 700; }
.pay-qty-row input {
    width: 90px; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 9px;
    font-size: 16px; text-align: center;
}

.pay-details { margin-top: 24px; }
.pay-details h2 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.pay-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .pay-fields { grid-template-columns: 1fr; } }
.pay-field label { display: block; font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 4px; }
.pay-field input {
    width: 100%; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: 15px;
}

.pay-terms {
    display: flex; align-items: flex-start; gap: 8px;
    margin-top: 16px; font-size: 14px; color: #334155; cursor: pointer;
}
.pay-terms input { margin-top: 3px; flex-shrink: 0; }
.pay-terms a { color: #059669; font-weight: 700; text-decoration: underline; }

.pay-total {
    display: flex; justify-content: space-between; align-items: baseline;
    border-top: 1px solid #eef2f7; margin-top: 18px; padding-top: 16px;
}
.pay-total .lbl { font-size: 16px; color: #475569; }
.pay-total .val { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }

.pay-btn {
    display: inline-block; width: 100%; margin-top: 18px; padding: 14px 18px;
    border: 0; border-radius: 12px; background: linear-gradient(135deg,#064e3b,#059669);
    color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
}
.pay-btn:disabled { opacity: .6; cursor: default; }
.pay-vat { text-align: center; color: #94a3b8; font-size: 13px; margin-top: 8px; }

/* result pages */
.pay-result { max-width: 520px; margin: 60px auto; text-align: center; padding: 0 16px; }
.pay-result .emoji { font-size: 56px; }
.pay-result h1 { font-size: 26px; font-weight: 800; margin: 12px 0 6px; }
.pay-result p { color: #64748b; }
.pay-result .pay-btn { width: auto; padding: 12px 26px; margin-top: 22px; }
.pay-result a.link { display: inline-block; margin-top: 14px; color: #059669; font-weight: 700; }

/* The VAT/receipt notice is required consumer copy — readable body text, not fine print. */
.pay-vat--lead {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
    font-weight: 600;
    margin-top: 14px;
    text-align: center;
}

.pay-cancel-link {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}
.pay-cancel-link a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
}

/* ─── "Do you already have an account?" fork ─── */
.pay-wrap--narrow { max-width: 640px; }

.pay-note {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 12px 14px;
    color: #0c4a6e;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.pay-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .pay-choice { grid-template-columns: 1fr; } }

.pay-choice-card {
    display: block;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 26px 18px 22px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pay-choice-card:hover {
    border-color: #059669;
    box-shadow: 0 6px 22px rgba(5,150,105,.14);
    transform: translateY(-2px);
}
.pay-choice-card--primary { background: #f0fdf4; border-color: #a7f3d0; }

.pay-choice-emoji { font-size: 34px; line-height: 1; }
.pay-choice-title { font-size: 18px; font-weight: 800; margin: 10px 0 6px; }
.pay-choice-sub { font-size: 14px; color: #64748b; line-height: 1.5; min-height: 42px; }
.pay-choice-cta {
    display: inline-block;
    margin-top: 14px;
    font-weight: 800;
    color: #059669;
}

/* ─── Merged register + pay page ─── */
.pay-have-account { margin-top: 12px; font-size: 14px; color: #64748b; }
.pay-have-account a { color: #059669; font-weight: 700; text-decoration: underline; }

/* Existing-subscription notice on the checkout page. */
.pay-note--warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #78350f;
}
.pay-note--warn strong { font-weight: 800; }

/* ─── Signup page (Identity Register, styled like the checkout pages) ─── */
.pay-note--trial {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    background: #f0fdf4;
    border-color: #a7f3d0;
    color: #065f46;
}
.pay-trial-badge {
    display: inline-block;
    background: #059669;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    border-radius: 999px;
    padding: 4px 12px;
    white-space: nowrap;
}

/* Server- and client-side validation messages on the signup form. */
.pay-form-error { display: block; color: #dc2626; font-size: 13px; font-weight: 600; }
.pay-form-error:empty { display: none; }
.pay-field .pay-form-error { margin-top: 4px; }
.pay-field input.input-validation-error { border-color: #dc2626; }

.pay-btn--outline {
    background: #fff;
    color: #065f46;
    border: 2px solid #a7f3d0;
    font-size: 16px;
}
.pay-external-list { display: flex; flex-direction: column; gap: 8px; }

/* Three-up plan row (free trial + the two paid plans). */
.pay-plans--three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 860px) { .pay-plans--three { grid-template-columns: 1fr; } }

.pay-plan--trial { border-color: #a7f3d0; background: #f8fefb; }
.pay-plan--trial .pay-plan-price { color: #059669; }
