/* ══════════════════════════════════════════
   QR Generator Component CSS
   Extracted from home.blade.php — do not rename classes (follow-up task).
   ══════════════════════════════════════════ */

/* ── Modal card ── */
.modal-card {
    width: 100%; max-width: 480px; max-height: 94vh;
    background: #fff; border-radius: 24px 24px 0 0;
    display: flex; flex-direction: column; overflow: hidden;
    animation: slideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
@media (min-height: 700px) { .modal-card { border-radius: 24px; } }
@keyframes slideUp {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── QR generator: rendered directly on the page, not as a floating
     dialog — visitors see the Design step immediately, no launcher
     button. Scoped to the #modal-overlay/.modal-card IDs (higher
     specificity than the .modal-overlay/.modal-card classes above)
     so the separate Profile modal, which reuses those classes,
     keeps its real popup behaviour untouched. ── */
#modal-overlay {
    position: static; inset: auto; background: transparent; backdrop-filter: none;
    display: block; z-index: auto; padding: 16px 20px 40px;
}
@media (min-height: 700px) { #modal-overlay { align-items: initial; padding: 16px 20px 40px; } }
@media (max-width: 640px) { #modal-overlay { padding: 12px 0 60px; } }
.modal-card {
    width: 100%; max-width: 860px; max-height: none; margin: 0 auto;
    border-radius: 20px; animation: fadeIn 0.25s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); border: 1px solid #E5E7EB;
}
@media (min-height: 700px) { .modal-card { border-radius: 20px; } }
@media (max-width: 640px) { .modal-card { border-radius: 0; border-left: none; border-right: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Screens that are simple forms (Mobile/Create Account/Verify/
   Done) stay comfortably narrow and centered even though .modal-card
   itself is now full dashboard width — only the Design step actually
   needs the full two-column canvas. */
.narrow-screen { max-width: 560px; margin: 0 auto; }

/* Subscription needs more room than a plain form — it's a 3-card plan
   comparison with a full feature list per card, not a couple of inputs.
   Matches .modal-card's own 860px ceiling (see #modal-overlay .modal-card)
   so the 3 cards get the most width the modal can possibly offer before
   they'd ever need to shrink or wrap. */
/* width:100% matters as much as max-width here — without it, the auto
   left/right margins (used for centering once .modal-card is wide enough to
   have spare room) override align-items:stretch on this flex item and size
   it to its own content instead, letting it grow past a narrower
   .modal-card (e.g. embedded next to a sidebar) instead of filling it. */
.wide-screen { width: 100%; max-width: 860px; margin: 0 auto; }

/* Offsets scrollIntoView() so a screen switch doesn't land the widget's
   top edge underneath the site's sticky nav bar (80px tall). */
.qrg-root { scroll-margin-top: 96px; }

/* Design step: 60/40 two-column dashboard layout, not a stacked
   single column — that's what made this screen read as a modal
   instead of a full-width SaaS panel. */
.design-grid { display: grid; grid-template-columns: 60% 40%; gap: 20px; align-items: start; }
.preview-card {
    background: #fff; border: 1px solid #E5E7EB; border-radius: 20px;
    padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
#design-footer-slot .modal-footer { margin-top: 20px; padding: 0; border-top: none; }
@media (max-width: 900px) {
    .design-grid { grid-template-columns: 1fr; gap: 0; }
    .design-right { margin-top: 8px; }
}
/* Mobile: style/eye/frame pickers become swipeable horizontal
   strips instead of a cramped multi-column grid. */
@media (max-width: 640px) {
    .style-grid, .eye-style-grid, .frame-grid {
        display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px;
        scrollbar-width: none; margin: 0 -20px; padding-left: 20px; padding-right: 20px;
    }
    .style-grid::-webkit-scrollbar, .eye-style-grid::-webkit-scrollbar, .frame-grid::-webkit-scrollbar { display: none; }
    .style-card, .eye-style-card, .frame-card { flex: 0 0 84px; }
}

/* ── Step rail ── */
.flow-rail {
    display: flex; align-items: flex-start; gap: 0;
    padding: 12px 20px 2px; overflow-x: auto; scrollbar-width: none;
}
.flow-rail::-webkit-scrollbar { display: none; }
.flow-rail-step {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    flex: 1; min-width: 64px; position: relative;
}
.flow-rail-line {
    position: absolute; top: 12px; left: calc(-50% + 12px); width: calc(100% - 24px); height: 2px;
    background: #EFDFCF; z-index: 0;
}
.flow-rail-step:first-child .flow-rail-line { display: none; }
.flow-rail-line.done { background: #F97316; }
.flow-rail-node {
    width: 24px; height: 24px; border-radius: 50%; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; border: 2px solid #EFDFCF;
    background: #fff; color: #8A7863;
}
.flow-rail-step.done .flow-rail-node { background: #F97316; border-color: #F97316; color: #fff; }
.flow-rail-step.active .flow-rail-node { background: #DD5F0B; border-color: #DD5F0B; color: #fff; box-shadow: 0 0 0 4px #FEEADA; }
.flow-rail-label { font-size: 10px; font-weight: 700; color: #8A7863; text-align: center; }
.flow-rail-step.active .flow-rail-label { color: #241708; }
@media (max-width: 480px) { .flow-rail-label { display: none; } }

.modal-card .modal-header {
    display: flex; align-items: center;
    padding: 18px 18px 0; gap: 8px; flex-shrink: 0;
}
.modal-card .modal-back {
    width: 34px; height: 34px; background: #f1f5f9; border: none;
    border-radius: 50%; font-size: 20px; color: #374151; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s; flex-shrink: 0;
}
.modal-card .modal-back:hover { background: #e2e8f0; }
.modal-card .modal-title { font-size: 17px; font-weight: 700; color: #0f172a; flex: 1; }
.modal-card .modal-close {
    width: 34px; height: 34px; background: #f1f5f9; border: none;
    border-radius: 50%; font-size: 18px; color: #64748b; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s; flex-shrink: 0;
}
.modal-card .modal-close:hover { background: #e2e8f0; }

/* ── Modal body ── */
/* min-width:0 overrides the flex item's default auto min-width (which is its
   content's min-content size) — without it, a wide row like .plan-grid-2
   pushes this whole flex item wider than .modal-card, and .modal-card's own
   overflow:hidden clips it silently at that outer edge before .plan-grid-2's
   own overflow-x:auto ever gets a chance to be the scrollable boundary. */
.modal-body { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 28px; }
@media (max-width: 640px) { .modal-body { padding: 14px 16px; } }

.section-label {
    font-size: 12px; font-weight: 700; color: #374151;
    margin-bottom: 6px; margin-top: 12px;
    display: flex; align-items: center; gap: 5px;
}
.section-label:first-child { margin-top: 0; }
.optional { font-weight: 400; color: #9ca3af; }

/* ── Logo upload ── */
.logo-upload-area {
    border: 1.5px dashed #d1d5db; border-radius: 10px;
    padding: 8px 14px; display: flex; flex-direction: row;
    align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; transition: border-color 0.2s, background 0.2s; min-height: 0;
}
.logo-upload-area:hover { border-color: #F97316; background: #FEEADA; }
.logo-upload-area.has-logo { border-style: solid; border-color: #F97316; padding: 6px 10px; }
.logo-placeholder-icon { width: 24px; height: 24px; background: #f1f5f9; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 11px; flex-shrink: 0; }
.logo-placeholder-text { font-size: 12px; color: #64748b; font-weight: 500; }
.logo-placeholder-hint { font-size: 10px; color: #9ca3af; }
.logo-help { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 4px; font-size: 11.5px; line-height: 1.45; color: #6b7280; }
.logo-help i { color: #F97316; margin-top: 2px; flex-shrink: 0; }
.logo-preview-thumb { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.logo-remove-btn { margin-top: 0; margin-left: 4px; background: none; border: none; color: #ef4444; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* ── Style grid ── */
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.style-card {
    border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 8px 6px;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    cursor: pointer; transition: border-color 0.2s, background 0.2s; user-select: none;
}
.style-card:hover    { border-color: #FDBA74; background: #FEEADA; }
.style-card.selected { border-color: #F97316; background: #FEEADA; }
.dot-sample { display: grid; grid-template-columns: repeat(3, 6px); grid-template-rows: repeat(3, 6px); gap: 2px; }
.dot-sample .d { width: 6px; height: 6px; background: #111; }
.style-card.selected .dot-sample .d { background: #F97316; }
[data-type="square"]         .d { border-radius: 0; }
[data-type="dots"]           .d { border-radius: 50%; }
[data-type="rounded"]        .d { border-radius: 3px; }
[data-type="classy"]         .d { border-radius: 0; border-top-left-radius: 5px; }
[data-type="classy-rounded"] .d { border-radius: 3px; border-top-left-radius: 7px; }
[data-type="extra-rounded"]  .d { border-radius: 6px; }
.style-name { font-size: 10px; font-weight: 600; color: #374151; text-align: center; line-height: 1.3; }
.style-card.selected .style-name { color: #dd5f0b; }

/* ── Color row ── */
.color-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.color-swatch {
    width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent;
    cursor: pointer; transition: transform 0.15s, border-color 0.15s; flex-shrink: 0;
}
.color-swatch:hover    { transform: scale(1.15); }
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px #F97316; }
.color-picker-btn {
    width: 28px; height: 28px; border-radius: 50%; border: 1.5px dashed #d1d5db;
    background: none; cursor: pointer; display: flex; align-items: center;
    justify-content: center; color: #9ca3af; font-size: 12px;
    transition: border-color 0.2s; position: relative; overflow: hidden;
}
.color-picker-btn:hover { border-color: #F97316; }
.color-picker-btn input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ── Preview ── */
.preview-wrap { display: flex; justify-content: center; padding: 14px 0 2px; }
#qr-preview {
    width: 210px; height: 210px; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10); background: #fff;
    display: flex; align-items: center; justify-content: center;
}
#qr-preview canvas { display: block; }

/* ── Eye style grid ── */
.eye-style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.eye-style-card {
    border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 8px 4px;
    display: flex; flex-direction: column; align-items: center; gap: 4px; color: #9ca3af;
    cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s; user-select: none;
}
.eye-style-card:hover    { border-color: #FDBA74; background: #FEEADA; }
.eye-style-card.selected { border-color: #F97316; background: #FEEADA; color: #F97316; }
.eye-style-card.selected .style-name { color: #dd5f0b; }

/* ── Frame grid ── */
.frame-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.frame-card {
    border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 8px 4px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    cursor: pointer; transition: border-color 0.2s, background 0.2s; user-select: none;
}
.frame-card:hover    { border-color: #FDBA74; background: #FEEADA; }
.frame-card.selected { border-color: #F97316; background: #FEEADA; }
.frame-card.selected .style-name { color: #dd5f0b; }
.frame-swatch { width: 26px; height: 26px; border: 2px solid #374151; background: none; }
.frame-swatch-none    { border: none; background: repeating-linear-gradient(45deg,#e5e7eb 0 4px,transparent 4px 8px); border-radius: 4px; }
.frame-swatch-rounded { border-radius: 9px; }
.frame-swatch-tag     { border-radius: 4px; position: relative; }
.frame-swatch-tag::after { content:''; position:absolute; left:50%; bottom:-7px; transform:translateX(-50%); width:10px; height:7px; background:#374151; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.frame-swatch-square  { border-radius: 0; }

/* ── Live preview: frame wrapper + banner ── */
.qr-preview-frame { display: inline-flex; align-items: center; justify-content: center; padding: 10px; }
.qr-preview-frame.frame-rounded { border: 6px solid #241708; border-radius: 22px; }
.qr-preview-frame.frame-tag     { border: 6px solid #241708; border-radius: 8px; position: relative; }
.qr-preview-frame.frame-tag::after {
    content: 'SCAN ME'; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
    background: #241708; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
    padding: 3px 10px; border-radius: 4px; white-space: nowrap;
}
.qr-preview-frame.frame-square  { border: 6px solid #241708; border-radius: 0; }

.design-ready-banner {
    display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 11px 14px;
    background: #FEEADA; border: 1px solid #FDBA74; border-radius: 10px;
    font-size: 12.5px; font-weight: 600; color: #7A3E0B;
}
.design-ready-banner i { color: #F97316; }

.otp-notice-banner {
    display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 11px 14px;
    background: #FEEADA; border: 1px solid #FDBA74; border-radius: 10px;
    font-size: 12.5px; font-weight: 600; color: #7A3E0B;
}
.otp-notice-banner i { color: #F97316; }

/* ── Subscription screen ──
   Desktop/tablet: cards sit in a single row (never wrap to 2-per-row).
   .wide-screen gives this row the most width the modal can offer (860px);
   fixed card width so feature text never has to compress to fit.
   Mobile: standard SaaS pricing pattern instead — cards stack full-width,
   one per row, plain vertical scroll. No horizontal peek/carousel to
   figure out, no cut-off edges. */
/* padding-top makes room for .plan-2-flag's "Most Popular" badge, which
   sits above the card's own top edge (top:-10px) — without it, overflow-x:
   auto here forces overflow-y to clip too (same rule that bit the feature
   tooltip earlier), cutting the badge off instead of just letting it show. */
/* Scoped under .plan-controls-bar — home.css has its own .billing-toggle
   for the marketing page, and loads before this file on the home page. */
.plan-controls-bar .billing-toggle {
    display: inline-flex; gap: 5px; padding: 5px; margin: 0;
    background: #F3F4F6; border-radius: 13px;
}
.plan-controls-bar .billing-toggle-btn {
    padding: 9px 22px; border: none; border-radius: 10px; background: transparent;
    color: #6B7280; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.plan-controls-bar .billing-toggle-btn:hover { color: #374151; }
.plan-controls-bar .billing-toggle-btn.selected { background: #fff; color: #EA580C; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.plan-controls-bar .billing-toggle-btn:focus-visible { outline: 2px solid #FED7AA; outline-offset: 2px; }
@media (max-width: 640px) {
    .plan-controls-bar .billing-toggle { flex-wrap: wrap; }
}

.plan-grid-2 { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 14px 0 10px; }
/* Unlike the mobile swipe-strips above (hidden scrollbar, touch-only), this
   row can overflow at ordinary desktop widths too — e.g. a dashboard with a
   sidebar narrower than 3 cards but still well above the 640px stacking
   breakpoint — so it needs a visible affordance instead of a hidden one. */
.plan-grid-2 { scrollbar-width: thin; scrollbar-color: #FDBA74 transparent; }
.plan-grid-2::-webkit-scrollbar { height: 7px; }
.plan-grid-2::-webkit-scrollbar-track { background: transparent; }
.plan-grid-2::-webkit-scrollbar-thumb { background: #FDBA74; border-radius: 999px; }
.plan-grid-2::-webkit-scrollbar-thumb:hover { background: #F97316; }
.plan-card-2 {
    /* Fixed width — wide enough that feature text (e.g. "Device & Browser
       Analytics") always fits on one line, on any viewport. */
    flex: 0 0 240px; width: 240px;
    border: 1.5px solid #e5e7eb; border-radius: 16px; padding: 16px 14px;
    cursor: pointer; transition: border-color 0.2s, background 0.2s; user-select: none;
    position: relative;
}
@media (max-width: 640px) {
    .plan-grid-2 { flex-direction: column; flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; }
    .plan-card-2 { flex: 1 1 auto; width: 100%; max-width: none; }
}
.plan-card-2:hover    { border-color: #FDBA74; background: #FFFAF5; }
.plan-card-2.selected { border-color: #F97316; background: #FEEADA; box-shadow: 0 0 0 3px #FEEADA; }
.plan-card-2.popular { border-color: #FDBA74; }
.plan-card-2.popular.selected { border-color: #F97316; }
.plan-2-flag {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #F97316; color: #fff; font-size: 10px; font-weight: 800;
    letter-spacing: 0.3px; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.plan-2-name { font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.plan-2-price { font-size: 19px; font-weight: 800; color: #F97316; margin-bottom: 2px; }
.plan-2-price span { font-size: 11px; font-weight: 600; color: #64748b; }
.plan-2-price-strike { font-size: 13px; font-weight: 600; color: #9ca3af; text-decoration: line-through; margin-right: 5px; }
.plan-2-save {
    display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 6px;
    background: rgba(22,163,74,0.1); color: #16A34A; font-size: 10.5px; font-weight: 700;
}
.plan-2-price-billed { font-size: 10.5px; color: #9ca3af; margin-bottom: 12px; }
.plan-2-gst-note { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: #9ca3af; margin: -8px 0 12px; }
.plan-2-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.plan-2-feats li { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: #374151; line-height: 1.4; }
.plan-2-feats i { color: #F97316; font-size: 11px; margin-top: 2px; flex-shrink: 0; }
.plan-2-note { font-size: 10.5px; color: #9ca3af; margin-top: 10px; line-height: 1.4; }

/* ── "Your Plan" order cards (#your-plan-grid, built by _renderYourPlanCards()
   in qr-generator.js) — one per real order, ledger-style rows instead of the
   marketing feature list Explore Plans cards use. All tiers (Free, Plus,
   Pro) share the same site-default orange accent theme (--yp-*). ── */
.plan-order-status {
    display: inline-block; margin-bottom: 0; padding: 2px 9px; border-radius: 999px;
    font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px;
}
.plan-order-status.active  { background: rgba(22,163,74,0.1); color: #16A34A; }
.plan-order-status.expired { background: rgba(220,38,38,0.08); color: #DC2626; }
.plan-order-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.plan-order-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 1.4; }
.plan-order-label { color: #9CA3AF; font-weight: 600; }
.plan-order-value { color: #374151; font-weight: 700; text-align: right; }

.your-plan-card {
    --yp-accent: #F97316; --yp-accent-bg: #FEEADA; --yp-accent-border: #FDBA74;
    padding-bottom: 16px; display: flex; flex-direction: column;
    /* background: linear-gradient(160deg, var(--yp-accent-bg) 0%, #fff 45%); */
}
.your-plan-card.selected { border-color: var(--yp-accent); background: linear-gradient(160deg, var(--yp-accent-bg) 0%, #fff 55%); box-shadow: 0 0 0 3px var(--yp-accent-bg); }

.your-plan-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.your-plan-cycle-badge {
    padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--yp-accent-border);
    background: #fff; color: var(--yp-accent); font-size: 10.5px; font-weight: 800;
}

.your-plan-name-row { display: flex; align-items: center; gap: 6px; }
.your-plan-card .plan-2-name { color: var(--yp-accent); font-size: 21px; margin-bottom: 0; }
.your-plan-pro-flair {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; background: var(--yp-accent-bg); color: var(--yp-accent); font-size: 10px;
}
.your-plan-pro-tag {
    padding: 1px 7px; border: 1.5px solid var(--yp-accent-border); border-radius: 6px;
    color: var(--yp-accent); font-size: 10px; font-weight: 800; letter-spacing: 0.3px;
}
.your-plan-desc { font-size: 12px; color: #6B7280; margin-top: 3px; line-height: 1.4; }
.your-plan-divider { height: 1px; background: #EDEDED; margin: 12px 0 10px; }

/* ── Feature info tooltip (hover/focus the i icon for the feature's description) ──
   #plan-feat-tooltip is ONE shared element, position:fixed and placed by JS
   from the hovered icon's bounding rect (see _initFeatureTooltips in
   qr-generator.js). It deliberately isn't position:absolute inside the card —
   .modal-body has overflow-y:auto, which per the CSS overflow spec forces
   overflow-x to clip too, so an absolutely-positioned tooltip here gets cut
   off the moment it crosses that boundary. Fixed positioning is relative to
   the viewport and ignores all scrolling/clipping ancestors. */
.plan-2-feat-info {
    display: inline-flex; align-items: center;
    color: #9CA3AF; cursor: help; margin-top: 1px; flex-shrink: 0;
}
.plan-2-feat-info:hover, .plan-2-feat-info:focus-within { color: #6B7280; }
#plan-feat-tooltip, #mkt-plan-tooltip {
    position: fixed; z-index: 300;
    background: #111827; color: #fff; font-size: 11px; font-weight: 500; line-height: 1.4;
    padding: 6px 10px; border-radius: 7px;
    max-width: 200px; text-align: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.12s ease;
}
#plan-feat-tooltip.visible, #mkt-plan-tooltip.visible { opacity: 1; visibility: visible; }
.plan-remaining-badge { display:none; margin-top:9px; padding:5px 10px; background:rgba(59,130,246,0.09); border-radius:8px; font-size:11.5px; color:#1d4ed8; font-weight:600; text-align:center; }
/* Free-only now (see subscription.blade.php) — a full sentence, so this
   reads as a small wrapped notice rather than the short uppercase pill a
   one-word badge would use. */
.plan-current-tag {
    display: block; margin: 4px 0 8px; padding: 7px 9px; border-radius: 8px;
    background: #FEEADA; color: #C2410C; font-size: 11px; font-weight: 600;
    line-height: 1.4;
}

/* ── Loading state while /subscriptions/my is in flight (see showScreen()
   in qr-generator.js) — replaces #plan-content entirely rather than
   overlaying it, so there's no stale content flash underneath. ── */
.plan-loading {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 48px 0; color: #9CA3AF; font-size: 13px; font-weight: 600;
}
.plan-loading i { color: #F97316; font-size: 15px; }

/* ── Plan-controls bar: Your Plan/Explore Plans tabs on top, shared
   billing-cycle toggle centered underneath — stacked, with the toggle
   sitting in the space between the tabs and the plan cards below. ── */
.plan-controls-bar {
    display: flex; flex-direction: column; margin: 14px 0 10px;
}
.plan-controls-bar .billing-toggle { align-self: center; margin: 18px 0 4px; }

/* ── Your Plan / Explore Plans tabs (existing subscribers only) — underline
   style matching the dashboard's All/Active tabs (.qr-tab in qr-list.css). ── */
.plan-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1.5px solid #F3F4F6; }
.plan-tab {
    padding: 10px 14px; border: none; border-bottom: 2.5px solid transparent;
    background: none; font-family: inherit;
    color: #6B7280; font-size: 12.5px; font-weight: 700; cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.plan-tab:hover { color: #374151; }
.plan-tab.selected { color: #F97316; border-bottom-color: #F97316; }
.plan-tab:focus-visible { outline: 2px solid #FED7AA; outline-offset: 2px; }

.plan-expired-notice {
    margin-top: 14px; padding: 10px 14px; border-radius: 9px;
    background: rgba(220,38,38,0.08); color: #DC2626; font-size: 12px; font-weight: 600;
    line-height: 1.5; text-align: center; cursor: pointer; transition: background 0.15s ease;
}
.plan-expired-notice:hover { background: rgba(220,38,38,0.14); }
.plan-expired-notice u { text-underline-offset: 2px; }
.plan-expired-notice a { color: inherit; text-underline-offset: 2px; }

/* ── Coupon ── */
.coupon-wrap { margin-top: 16px; }
.coupon-input-row {
    display: flex; align-items: center; gap: 8px;
    border: 1.5px solid #e5e7eb; border-radius: 12px; overflow: hidden;
    transition: border-color 0.2s;
}
.coupon-input-row:focus-within { border-color: #F97316; }
.coupon-input {
    flex: 1; min-width: 0; border: none; outline: none;
    padding: 10px 14px; font-size: 13px; font-family: inherit;
    color: #111827; background: none; text-transform: uppercase;
}
.coupon-input::placeholder { text-transform: none; color: #9ca3af; }
.coupon-apply-btn {
    padding: 8px 16px; background: #F97316; color: #fff;
    border: none; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; flex-shrink: 0;
    transition: background 0.15s;
}
.coupon-apply-btn:hover { background: #EA580C; }
.coupon-apply-btn:disabled { background: #fdba74; cursor: not-allowed; }
.coupon-feedback { margin-top: 8px; font-size: 12.5px; font-weight: 500; min-height: 18px; }
.coupon-feedback.success { color: #065F46; }
.coupon-feedback.error   { color: #DC2626; }
.coupon-savings {
    display: flex; align-items: center; justify-content: space-between;
    background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 10px;
    padding: 9px 13px; margin-top: 10px;
}
.coupon-savings-label { font-size: 12px; font-weight: 600; color: #065F46; }
.coupon-savings-price { font-size: 13px; font-weight: 800; color: #065F46; }
.coupon-savings-original { font-size: 11px; color: #6B7280; text-decoration: line-through; }

/* ── Quantity screen ── */
.qty-counter-wrap { display:flex; align-items:center; justify-content:center; margin:30px auto 8px; border:1.5px solid #e5e7eb; border-radius:16px; overflow:hidden; width:fit-content; }
.qty-counter-btn { width:56px; height:56px; border:none; background:#f9fafb; color:#374151; font-size:22px; font-weight:500; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background 150ms; font-family:inherit; }
.qty-counter-btn:hover:not(:disabled) { background:#f3f4f6; }
.qty-counter-btn:disabled { color:#d1d5db; cursor:not-allowed; }
.qty-counter-input { width:90px; height:56px; border:none; border-left:1.5px solid #e5e7eb; border-right:1.5px solid #e5e7eb; text-align:center; font-size:22px; font-weight:700; color:#111827; font-family:inherit; background:#fff; outline:none; -moz-appearance:textfield; }
.qty-counter-input::-webkit-outer-spin-button, .qty-counter-input::-webkit-inner-spin-button { -webkit-appearance:none; }
.qty-of-max { text-align:center; font-size:13px; color:#6b7280; margin-bottom:4px; }
.qty-info-box { display:flex; align-items:flex-start; gap:8px; padding:12px 14px; background:rgba(59,130,246,0.07); border:1px solid rgba(59,130,246,0.18); border-radius:10px; font-size:12.5px; color:#1d4ed8; margin-top:16px; }
.qty-info-box i { flex-shrink:0; margin-top:1px; color:#3b82f6; }

/* ── Footer (QR generator form steps) ── */
.modal-card .modal-footer { padding: 14px 20px 24px; flex-shrink: 0; background: #fff; border-top: 1px solid #f1f5f9; }
@media (max-width: 640px) {
    .modal-card .modal-footer { position: sticky; bottom: 0; box-shadow: 0 -8px 24px rgba(0,0,0,0.06); }
}
.footer-btn-row { display: flex; gap: 10px; align-items: center; }
.footer-btn-row .generate-btn, .footer-btn-row .reset-btn { flex: 1 1 0; }
.footer-btn-row.narrow-screen { max-width: 360px; }
.reset-btn {
    padding: 16px 24px; background: #fff; color: #F97316;
    border: 1.5px solid #F97316; border-radius: 16px; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: background 250ms ease, border-color 250ms ease, color 250ms ease, transform 250ms ease;
}
.reset-btn:hover:not(:disabled) { background: #FFF7ED; border-color: #EA580C; color: #EA580C; transform: translateY(-1px) scale(1.01); }
.reset-btn:active:not(:disabled) { transform: scale(0.98); }
.reset-btn:disabled { border-color: #E5E7EB; color: #9CA3AF; background: #FAFAFA; cursor: not-allowed; transform: none; }
.reset-btn:focus-visible { outline: 2px solid #FED7AA; outline-offset: 2px; }
.generate-btn {
    flex: 1; min-width: 180px; padding: 16px 32px; background: linear-gradient(135deg, #FF7A18, #F97316); color: #fff;
    border: none; border-radius: 16px; font-size: 16px; font-weight: 600;
    cursor: pointer; font-family: inherit; display: flex; align-items: center;
    justify-content: center; gap: 10px;
    box-shadow: 0 12px 30px rgba(249,115,22,0.25);
    transition: filter 250ms ease, transform 250ms ease, box-shadow 250ms ease;
}
.generate-btn:hover:not(:disabled)  { filter: brightness(0.92); transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 40px rgba(249,115,22,0.35); }
.generate-btn:active:not(:disabled) { transform: scale(0.98); }
.generate-btn:disabled { background: #FDBA74; color: #fff; cursor: not-allowed; box-shadow: none; transform: none; }
.generate-btn:focus-visible { outline: 2px solid #FED7AA; outline-offset: 2px; }

/* ── Complete (Done) screen ── */
.complete-check {
    width: 56px; height: 56px; background: #22C55E; color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    margin: 4px auto 16px;
}
.complete-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.complete-qr-frame {
    width: 170px; height: 170px; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 24px rgba(36,23,8,0.12); background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.complete-qr-badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
    color: #dd5f0b; background: #FEEADA; padding: 4px 11px; border-radius: 999px;
}
.complete-details-card {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 6px 16px; margin-bottom: 16px;
}
.complete-detail-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0; font-size: 12.5px; color: #64748b; border-bottom: 1px solid #e2e8f0;
}
.complete-detail-row:last-child { border-bottom: none; }
.complete-detail-row b { color: #0f172a; font-weight: 700; text-align: right; word-break: break-all; }
.complete-status-pill, .complete-status-pill-inactive {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
    padding: 3px 10px; border-radius: 999px;
}
.complete-status-pill { color: #166534; background: #dcfce7; }
.complete-status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #22C55E; }
.complete-status-pill-inactive { color: #92400E; background: #FEF3C7; }
.complete-status-pill-inactive::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; }
.complete-multi-note {
    display: flex; gap: 9px; align-items: flex-start; background: #FEEADA; border: 1px solid #FDBA74;
    border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #7A3E0B; line-height: 1.5; margin-bottom: 16px;
}
.complete-multi-note i { color: #F97316; margin-top: 1px; flex-shrink: 0; }
.complete-actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
/* Multi-QR result hides Download PNG/SVG (see showGeneratedResult() in
   qr-generator.js) — reflow to 2 even columns instead of leaving their
   slots empty. */
.complete-actions-grid.two-cols { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 420px) { .complete-actions-grid { grid-template-columns: repeat(2, 1fr); } }
.complete-action-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px;
    border: 1.5px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer;
    font-size: 11px; font-weight: 700; color: #374151; font-family: inherit; transition: border-color 0.2s;
}
.complete-action-btn:hover { border-color: #FDBA74; }
.complete-action-btn i { color: #F97316; font-size: 15px; }
.complete-bottom-actions { display: flex; gap: 10px; }
.complete-btn-outline {
    flex: 1; min-width: 180px; padding: 16px 32px; background: #fff; border: 1.5px solid #F97316; border-radius: 16px;
    color: #F97316; font-size: 16px; font-weight: 600; text-align: center; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    transition: background 250ms ease, border-color 250ms ease, color 250ms ease, transform 250ms ease;
}
.complete-btn-outline:hover { background: #FFF7ED; border-color: #EA580C; transform: translateY(-1px) scale(1.01); }
.complete-btn-outline:active { transform: scale(0.98); }
.complete-btn-outline:focus-visible { outline: 2px solid #FED7AA; outline-offset: 2px; }
.complete-bottom-actions .generate-btn { flex: 1; }

/* ── Mobile number screen ── */
.verify-screen-icon {
    width: 64px; height: 64px; background: #FEEADA; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #F97316; font-size: 26px; margin: 8px auto 18px;
}
.verify-screen-icon-lg {
    width: 84px; height: 84px; background: #E9E5DF; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #9c9488; font-size: 32px; margin: 8px auto 18px;
}
.verify-screen-title { font-size: 20px; font-weight: 800; color: #0f172a; text-align: center; margin-bottom: 6px; }
.verify-screen-sub   { font-size: 14px; color: #64748b; text-align: center; line-height: 1.6; margin-bottom: 20px; }

.selected-services-summary {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 12px 14px; margin-bottom: 20px;
}
.summary-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px; }
.summary-item { display: flex; justify-content: space-between; font-size: 13px; color: #374151; padding: 3px 0; }
.summary-item span:last-child { font-weight: 700; color: #F97316; }
.summary-total { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: #0f172a; border-top: 1px solid #e2e8f0; margin-top: 8px; padding-top: 8px; }
.summary-total span:last-child { color: #F97316; }

.mobile-input-wrap { display: flex; gap: 8px; }
.mobile-input-wrap:focus-within .mobile-input { border-color: #F97316; }
.mobile-input-wrap.has-error .mobile-input { border-color: #ef4444; }
.mobile-prefix {
    padding: 0 14px; background: #fff; border: 1.5px solid #e2e8f0; border-radius: 999px;
    font-size: 15px; font-weight: 600; color: #374151; flex-shrink: 0;
    display: flex; align-items: center; gap: 6px;
}
.mobile-prefix i { font-size: 10px; color: #9ca3af; }
.mobile-input {
    flex: 1; padding: 0.88rem 2rem; border: 1.5px solid #e2e8f0; border-radius: 999px;
    outline: none; font-size: 15px; font-family: inherit; color: #0f172a; background: #fff;
    transition: border-color 0.2s; min-width: 0;
}
.mobile-input::placeholder { color: #9ca3af; }
.field-error-msg { font-size: 12px; color: #ef4444; margin-top: 6px; min-height: 16px; }

/* ── OTP screen ── */
.mobile-display-tag { font-size: 15px; font-weight: 700; color: #241708; }
.change-number-link {
    background: none; border: none; color: #F97316; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; padding: 0; margin-left: 6px;
}
.otp-boxes-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.otp-box-h {
    width: 44px; height: 52px; background: #f8fafc;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    color: #0f172a; font-size: 20px; font-weight: 700; text-align: center;
    outline: none; caret-color: #F97316; transition: border-color 0.2s;
    font-family: inherit;
}
.otp-box-h:focus, .otp-box-h.filled { border-color: #F97316; background: #fff; }
.otp-boxes-row.has-error .otp-box-h { border-color: #ef4444; }
.resend-text { text-align: center; font-size: 13px; color: #64748b; margin-top: 14px; margin-bottom: 4px; }
.resend-action { background: none; border: none; color: #F97316; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; padding: 0; margin-left: 4px; }
.resend-banner {
    display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding: 12px 14px;
    background: #EFFCF3; border: 1px solid #B9EFC7; border-radius: 10px;
    font-size: 12.5px; color: #256B3A; line-height: 1.5;
}
.resend-banner i { color: #22C55E; margin-top: 1px; flex-shrink: 0; }

/* ── Error toast ── */
.error-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #1a1a1a; border: 1px solid #EF4444; border-radius: 14px;
    padding: 13px 16px; display: flex; align-items: center; gap: 10px;
    width: calc(100% - 48px); max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45); z-index: 400; animation: toastIn 0.2s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.error-toast-msg   { flex: 1; font-size: 13px; font-weight: 500; color: #fff; }
.error-toast-close { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 16px; }
