
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f8;
    color: #333;
    padding: 32px 20px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
}
*, *::before, *::after { box-sizing: border-box; }

form {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

h1 {
    margin-top: 0;
    font-size: 28px;
    text-align: center;
    color: #2c3e50;
}

h2 {
    font-size: 18px;
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 20px;
    font-weight: 600;
}

input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

 textarea {
     width: 100%;
     min-height: 100px;
     padding: 10px 12px;
     border: 1px solid #ccc;
     border-radius: 8px;
     font-size: 16px;
     font-family: inherit;
     resize: vertical;
     background: #fafafa;
     box-sizing: border-box;
     transition: border-color 0.3s;
     margin-top: 8px;
 }

textarea:focus {
    border-color: #3498db;
    outline: none;
    background: #fff;
}

label, textarea {
    display: block;
}

div > label,
div > textarea {
    margin-bottom: 20px;
}

div > label input {
    display: block;
    margin-top: 8px;
}


input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
}

.btnNextStepAuth {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.btnNextStepAuth:hover {
    background-color: #2980b9;
}

.btnNextStepAuth:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.StripeElement {
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fafafa;
}

.StripeElement--focus {
    border-color: #3498db;
}
.form-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background-color: #e8f8ec;
    color: #2c662d;
    border: 1px solid #b6e2c1;
}

.alert-error {
    background-color: #fdecea;
    color: #a94442;
    border: 1px solid #f5c6cb;
}

label span {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* optional spacing between $ and input */
}

label span input {
    flex: 1;
}

.tiers {
    border: 1px solid #e1e6ea;
    border-radius: 10px;
    padding: 14px 16px 16px;
    margin: 0 0 20px;
}

.tiers legend {
    font-weight: 600;
    color: #2c3e50;
    padding: 0 6px;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.tiers legend small {
    color: #7f8c8d;
    font-weight: 500;
    margin-left: 4px;
}

.tier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tier {
    appearance: none;
    background: #fafbfc;
    border: 1px solid #d8dee3;
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: border-color 0.15s, background 0.15s, transform 0.05s;
    font-family: inherit;
}

.tier:hover {
    border-color: #3498db;
    background: #fff;
}

.tier:active { transform: translateY(1px); }

.tier.selected {
    border-color: #3498db;
    background: #eaf4fc;
    box-shadow: inset 0 0 0 1px #3498db;
}

.tier-hours {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.tier-price {
    font-size: 20px;
    font-weight: 700;
    color: #1f2d3d;
}

.tier-meta {
    font-size: 11px;
    color: #7f8c8d;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* ───── Invoice mode (when /pay/?invoice=CODE) ────────────────────────
   A focused, locked-down payment surface — the customer sees only
   what they were billed for, not the open tier picker. */
.invoice-banner {
    background: linear-gradient(180deg, #1a1208 0%, #2a1d0c 100%);
    border: 1px solid #c9a84c;
    border-top: 4px solid #c9a84c;
    border-radius: 12px;
    padding: 22px 24px;
    margin: 0 0 18px;
    color: #fff8e1;
    text-align: center;
    box-shadow: 0 6px 28px rgba(0,0,0,0.10);
}
.invoice-banner h1 {
    margin: 6px 0 4px;
    font-family: 'Cinzel', 'Trajan Pro', Georgia, serif;
    color: #f0d07a;
    font-size: 22px;
    letter-spacing: 0.04em;
}
.invoice-banner-top {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.invoice-banner-label {
    color: #c9a84c;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
}
.invoice-banner-code {
    font-family: ui-monospace, Menlo, monospace;
    color: #ffe19a;
    font-size: 13px;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border: 1px solid rgba(240, 208, 122, 0.4);
    border-radius: 4px;
}
.invoice-banner-paid {
    background: #4caf50;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.10em;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
}
.invoice-banner-customer {
    color: #d8c89a;
    font-size: 12px;
    margin: 4px 0 8px;
}
.invoice-banner-amount {
    font-size: 38px;
    font-weight: 800;
    color: #ffe19a;
    margin: 8px 0 0;
    letter-spacing: 0.02em;
}
.invoice-banner-sub {
    color: rgba(232, 216, 168, 0.65);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 8px 0 0;
}

/* In invoice mode the editable Amount / Note rows collapse to read-only
   one-liners so the customer can't dial the amount down or rewrite the
   description. */
.invoice-amount-row,
.invoice-note-row { display: none; }

/* ── Per-template repaint of the invoice banner ──
   Body class is invoice-tpl-<name>; matches the templates available in
   /admin8490/invoice.php (gold | minimal | classic | receipt | warm). */
body.invoice-tpl-minimal .invoice-banner {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-top: 4px solid #111;
    color: #111;
    border-radius: 4px;
}
body.invoice-tpl-minimal .invoice-banner h1,
body.invoice-tpl-minimal .invoice-banner-amount { color: #111; }
body.invoice-tpl-minimal .invoice-banner-label,
body.invoice-tpl-minimal .invoice-banner-sub { color: #777; }
body.invoice-tpl-minimal .invoice-banner-customer { color: #555; }
body.invoice-tpl-minimal .invoice-banner-code {
    color: #111; border-color: #ccc;
}

body.invoice-tpl-classic .invoice-banner {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-top: 6px solid #1e40af;
    color: #1f2937;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
body.invoice-tpl-classic .invoice-banner h1,
body.invoice-tpl-classic .invoice-banner-amount { color: #1e40af; }
body.invoice-tpl-classic .invoice-banner-label,
body.invoice-tpl-classic .invoice-banner-sub { color: #475569; }
body.invoice-tpl-classic .invoice-banner-customer { color: #475569; }
body.invoice-tpl-classic .invoice-banner-code { color: #1e40af; border-color: #cbd5e1; }

body.invoice-tpl-receipt .invoice-banner {
    background: #fdfcf6;
    border: 1px dashed #999;
    border-top: 1px dashed #999;
    color: #222;
    border-radius: 0;
    font-family: 'Courier New', ui-monospace, monospace;
}
body.invoice-tpl-receipt .invoice-banner h1 { color: #000; font-family: 'Courier New', monospace; }
body.invoice-tpl-receipt .invoice-banner-amount { color: #000; }
body.invoice-tpl-receipt .invoice-banner-label,
body.invoice-tpl-receipt .invoice-banner-sub { color: #555; }
body.invoice-tpl-receipt .invoice-banner-customer { color: #333; }
body.invoice-tpl-receipt .invoice-banner-code { color: #000; border-color: #999; }

body.invoice-tpl-warm .invoice-banner {
    background: #fff8ef;
    border: 1px solid #f0d9bf;
    border-top: 5px solid #e89a5c;
    color: #3a2b1f;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(232,154,92,0.20);
}
body.invoice-tpl-warm .invoice-banner h1,
body.invoice-tpl-warm .invoice-banner-amount { color: #c25f1a; }
body.invoice-tpl-warm .invoice-banner-label,
body.invoice-tpl-warm .invoice-banner-sub { color: #a86839; }
body.invoice-tpl-warm .invoice-banner-customer { color: #6e553e; }
body.invoice-tpl-warm .invoice-banner-code { color: #c25f1a; border-color: #f0d9bf; }
