/* ==========================================================================
   Plan ticket — the restaurant plan rendered as a kitchen order ticket.
   Used by: Account/Register, Billing/Plan, Home/Index, Home/Plans.
   Markup: Views/Shared/_PlanTicket.cshtml · Behaviour: js/plan-promo.js
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;800&display=swap');

.lbt {
    --lbt-paper: #fffdf7;
    --lbt-ink: #16140f;
    --lbt-faint: #8a8373;
    --lbt-rule: rgba(22,20,15,.18);
    --lbt-green: #1F5E4B;
    --lbt-green-2: #2A7A60;
    --lbt-stamp: #c2410c;
    --lbt-tooth: 9px;
    --lbt-bg: var(--lbt-host-bg, #f0f7f4); /* colour behind the ticket, for the torn edges */
    --lbt-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    position: relative;
    max-width: 420px;
    margin: 0 auto;
    color: var(--lbt-ink);
    font-family: var(--lbt-mono);
    filter: drop-shadow(0 22px 40px rgba(2,6,23,.14)) drop-shadow(0 2px 4px rgba(2,6,23,.06));
    transform: rotate(-1.2deg);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.lbt:hover { transform: rotate(0deg) translateY(-3px); }
.lbt.lbt-flat, .lbt.lbt-flat:hover { transform: none; }

/* Torn/perforated top & bottom edges — pure CSS zigzag. */
.lbt-paper {
    position: relative;
    background: var(--lbt-paper);
    padding: 30px 26px 30px;
    background-image:
        repeating-linear-gradient(0deg, rgba(22,20,15,.018) 0 1px, transparent 1px 3px);
}
.lbt-paper::before,
.lbt-paper::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: var(--lbt-tooth);
    background-size: calc(var(--lbt-tooth) * 2) var(--lbt-tooth);
    background-repeat: repeat-x;
}
.lbt-paper::before {
    top: 0;
    background-image:
        linear-gradient(135deg, var(--lbt-bg) 50%, transparent 50%),
        linear-gradient(225deg, var(--lbt-bg) 50%, transparent 50%);
}
.lbt-paper::after {
    bottom: 0;
    background-image:
        linear-gradient(45deg, var(--lbt-bg) 50%, transparent 50%),
        linear-gradient(315deg, var(--lbt-bg) 50%, transparent 50%);
}

.lbt-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--lbt-faint);
}
.lbt-head b { color: var(--lbt-ink); font-weight: 800; letter-spacing: .18em; }

.lbt-rule { border: 0; border-top: 1.5px dashed var(--lbt-rule); margin: 16px 0; opacity: 1; }
.lbt-rule.solid { border-top-style: solid; border-top-width: 2px; border-top-color: var(--lbt-ink); }

.lbt-for {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--lbt-green);
}
.lbt-price {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 6px;
    line-height: 1;
    font-family: Inter, system-ui, sans-serif;
}
.lbt-price .cur { font-size: 26px; font-weight: 800; margin-top: 8px; }
.lbt-price .amt {
    font-size: 76px;
    font-weight: 900;
    letter-spacing: -.05em;
    transition: color .3s;
}
.lbt-price .per {
    align-self: flex-end;
    margin-bottom: 10px;
    font-family: var(--lbt-mono);
    font-size: 13px;
    color: var(--lbt-faint);
}
.lbt-price .was {
    align-self: flex-end;
    margin: 0 0 12px 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--lbt-faint);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    display: none;
}
.lbt.has-promo .lbt-price .amt { color: var(--lbt-green); }
.lbt.has-promo .lbt-price .was { display: inline; }
.lbt-tagline { font-size: 12px; color: var(--lbt-faint); margin-top: 8px; font-family: var(--lbt-mono); }

/* Receipt line items with dot leaders */
.lbt-lines { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.lbt-lines li {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 0;
}
.lbt-lines li .lbl { white-space: nowrap; }
.lbt-lines li .dots {
    flex: 1;
    min-width: 12px;
    border-bottom: 2px dotted var(--lbt-rule);
    transform: translateY(-3px);
}
.lbt-lines li .val { white-space: nowrap; font-weight: 800; }
.lbt-lines li .val s { color: var(--lbt-faint); font-weight: 400; margin-right: 6px; }
.lbt-lines li .val.ok { color: var(--lbt-green); }

.lbt-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.lbt-total .v { font-size: 22px; letter-spacing: -.01em; }
.lbt-then { font-size: 11.5px; color: var(--lbt-faint); margin-top: 4px; text-align: right; min-height: 1em; }

/* Promo code input — styled like a handwritten slot on the ticket */
.lbt-promo { margin-top: 18px; }
.lbt-promo-toggle {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 12px;
    color: var(--lbt-green);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.lbt-promo-row { display: flex; gap: 8px; }
.lbt-promo-row input {
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 10px 12px;
    border: 1.5px dashed var(--lbt-rule);
    border-radius: 8px;
    background: #fff;
    color: var(--lbt-ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.lbt-promo-row input:focus { border-color: var(--lbt-green); box-shadow: 0 0 0 3px rgba(31,94,75,.12); }
.lbt-promo-row button {
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 0 14px;
    border-radius: 8px;
    border: 0;
    background: var(--lbt-ink);
    color: var(--lbt-paper);
    cursor: pointer;
}
.lbt-promo-row button:disabled { opacity: .5; cursor: default; }
.lbt-promo-msg { font-size: 12px; margin-top: 8px; min-height: 1.2em; }
.lbt-promo-msg.ok { color: var(--lbt-green); font-weight: 800; }
.lbt-promo-msg.bad { color: #b91c1c; }

/* Rubber stamp — slams onto the ticket when a code applies */
.lbt-stamp {
    position: absolute;
    top: 92px;
    right: 18px;
    z-index: 2;
    padding: 8px 12px 7px;
    border: 3px solid var(--lbt-stamp);
    border-radius: 10px;
    color: var(--lbt-stamp);
    font-family: var(--lbt-mono);
    font-weight: 800;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(9deg);
    mix-blend-mode: multiply;
    pointer-events: none;
    opacity: .9;
    /* ink texture */
    -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.72) 61%, #000 75%);
            mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.72) 61%, #000 75%);
}
.lbt-stamp big { display: block; font-size: 22px; letter-spacing: .02em; margin: 1px 0; }
.lbt-stamp.green { --lbt-stamp: var(--lbt-green); }
.lbt-stamp[hidden] { display: none; }
.lbt-stamp.slam { animation: lbt-slam .42s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes lbt-slam {
    0%   { opacity: 0; transform: rotate(18deg) scale(2.2); }
    60%  { opacity: .95; transform: rotate(7deg) scale(.94); }
    100% { opacity: .9; transform: rotate(9deg) scale(1); }
}

.lbt-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--lbt-green-2), var(--lbt-green));
    color: #fff;
    font-family: Inter, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(31,94,75,.28);
    transition: transform .15s, box-shadow .15s;
}
.lbt-cta:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(31,94,75,.34); }
.lbt-fine { font-size: 10.5px; color: var(--lbt-faint); text-align: center; margin-top: 12px; line-height: 1.5; }

/* Compact variant (registration form) */
.lbt.lbt-compact { max-width: none; }
.lbt.lbt-compact .lbt-paper { padding: 24px 20px; }
.lbt.lbt-compact .lbt-price .amt { font-size: 54px; }
.lbt.lbt-compact .lbt-price .cur { font-size: 20px; margin-top: 5px; }
.lbt.lbt-compact .lbt-stamp { top: 58px; }

@media (max-width: 420px) {
    .lbt-paper { padding: 26px 18px; }
    .lbt-price .amt { font-size: 60px; }
    .lbt-stamp { right: 10px; top: 80px; }
    .lbt-lines { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .lbt, .lbt:hover { transform: none; transition: none; }
    .lbt-stamp.slam { animation: none; }
}
