/* Free no-signup receipt maker embedded on /lp/* receipt pages. */
.fr-sec { padding: 4.5rem 0; background: var(--lp-bg, #f7faf9); border-top: 1px solid var(--line, #e5e7eb); border-bottom: 1px solid var(--line, #e5e7eb); }
.fr-head { text-align: center; max-width: 44rem; margin: 0 auto 2.4rem; }
.fr-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 900; letter-spacing: -0.02em; margin: 0.4rem 0 0.6rem; }
.fr-head p { color: var(--muted, #5b6474); font-size: 1.1rem; margin: 0; }
.fr-badges { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; justify-content: center; margin-top: 1rem; font-size: 0.92rem; font-weight: 700; color: var(--g-dark, #047857); }
.fr-badges i { margin-right: 0.35rem; }

.fr-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2rem; align-items: start; }

.fr-form { background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: var(--radius, 18px); padding: 1.6rem; box-shadow: var(--shadow-md); }
.fr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.fr-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; min-width: 0; }
.fr-field label { font-size: 0.82rem; font-weight: 700; color: var(--ink-2, #1f2937); }
.fr-field input, .fr-field select {
    font: inherit; font-size: 1rem; padding: 0.7rem 0.8rem; border: 1.5px solid #d1d5db; border-radius: 10px;
    background: #fff; color: var(--ink, #0b1220); width: 100%; min-width: 0; box-sizing: border-box;
}
.fr-field input:focus, .fr-field select:focus { outline: none; border-color: var(--g, #059669); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15); }
.fr-amount { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.5rem; }
.fr-check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; font-weight: 600; margin: 0.2rem 0 1.1rem; cursor: pointer; }
.fr-check input { width: 18px; height: 18px; accent-color: var(--g, #059669); }
.fr-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.fr-actions .btn { flex: 1 1 auto; }
main .fr-actions .fr-clear { background: none; border: none; color: var(--muted, #5b6474); font-weight: 700; font-size: 0.92rem; padding: 0.6rem; cursor: pointer; flex: 0 0 auto; box-shadow: none; }
.fr-hint { font-size: 0.84rem; color: var(--muted, #5b6474); margin: 0.8rem 0 0; }

.fr-preview-wrap { position: sticky; top: 90px; }
.fr-preview-label { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted, #5b6474); margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem; }

.fr-upsell { margin-top: 1.2rem; background: linear-gradient(135deg, #065f46, #059669); color: #fff; border-radius: var(--radius, 18px); padding: 1.3rem 1.4rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.fr-upsell h3 { margin: 0 0 0.25rem; font-size: 1.1rem; font-weight: 800; }
.fr-upsell p { margin: 0; font-size: 0.92rem; opacity: 0.92; }
.fr-upsell.fr-pop { animation: frPop 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes frPop { from { transform: scale(0.96); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }

/* ---------- The receipt itself (screen preview + print) ---------- */
.fr-receipt {
    background: #fff; color: #111827; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.6rem 1.7rem 1.1rem;
    box-shadow: 0 20px 50px -20px rgba(11, 18, 32, 0.25); font-family: Inter, Arial, sans-serif; font-size: 13px; line-height: 1.45;
}
.fr-r-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 2px solid #111827; padding-bottom: 0.7rem; margin-bottom: 0.9rem; }
.fr-r-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; word-break: break-word; }
.fr-r-meta { text-align: right; font-size: 12px; color: #374151; white-space: nowrap; }
.fr-r-meta b { color: #111827; }
.fr-r-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.9rem; }
.fr-r-k { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; margin-bottom: 0.15rem; }
.fr-r-v { font-weight: 600; min-height: 1.45em; word-break: break-word; }
.fr-blank { display: block; border-bottom: 1px solid #9ca3af; min-height: 1.45em; }
.fr-r-line { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 0.55rem 0; }
.fr-r-line .fr-r-v { flex: 1; }
.fr-r-words { font-size: 12px; color: #374151; font-style: italic; margin: 0.45rem 0 0; min-height: 1.2em; }
.fr-r-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.7rem; padding-top: 0.6rem; border-top: 2px solid #111827; }
.fr-r-total span { font-weight: 800; }
.fr-r-total strong { font-size: 20px; font-weight: 900; }
.fr-r-method { font-size: 12px; color: #374151; margin-top: 0.25rem; }
.fr-r-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2.2rem; }
.fr-r-sig { border-top: 1px solid #111827; padding-top: 0.3rem; font-size: 11px; color: #4b5563; }
.fr-r-foot { margin-top: 1.1rem; text-align: center; font-size: 10px; color: #9ca3af; }
.fr-r-foot b { color: #059669; }
.fr-cut { text-align: center; font-size: 10px; color: #9ca3af; border-top: 1px dashed #9ca3af; margin: 7mm 0; line-height: 0; }
.fr-cut span { background: #fff; padding: 0 8px; }

#frPrint { display: none; }
body.fr-in-view .m-cta { display: none !important; }

@media (max-width: 900px) {
    .fr-grid { grid-template-columns: 1fr; }
    .fr-preview-wrap { position: static; }
}
@media (max-width: 520px) {
    .fr-sec { padding: 3rem 0; }
    .fr-form { padding: 1.1rem; }
    .fr-row { grid-template-columns: 1fr; gap: 0; }
    .fr-row.fr-row-keep { grid-template-columns: 1fr 6.5rem; gap: 0.6rem; }
    .fr-receipt { padding: 1.1rem 1rem 0.9rem; font-size: 12px; }
    .fr-r-top { flex-direction: column; gap: 0.3rem; }
    .fr-r-meta { text-align: left; }
}

@media print {
    @page { margin: 12mm; }
    body > *:not(#frPrint) { display: none !important; }
    #frPrint { display: block !important; }
    #frPrint .fr-receipt { box-shadow: none; border: 1px solid #d1d5db; border-radius: 0; break-inside: avoid; }
    html, body { background: #fff !important; }
}
