/* 🎓 First-time tutorial: welcome screen + spotlight tour (layouts/_tour.blade.php) */
:root { --tv-brand: #0b7a75; --tv-mint: #8fe3da; --tv-amber: #f0b934; --tv-ink: #17212b; --tv-muted: #5b6875; }
.tv-dim { position: fixed; inset: 0; z-index: 80; background: rgba(8, 25, 24, .62); animation: tvFade .3s ease; }
.tv-hole { position: fixed; z-index: 81; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(8, 25, 24, .62); pointer-events: none; transition: all .35s cubic-bezier(.2, .8, .2, 1); }
.tv-hole::after { content: ""; position: absolute; inset: -6px; border-radius: 18px; border: 3px solid var(--tv-amber); animation: tvPulse 1.4s ease-out infinite; }
.tv-block { position: fixed; inset: 0; z-index: 80; }
.tv-card { position: fixed; z-index: 82; width: 340px; max-width: calc(100vw - 24px); background: #fff; color: var(--tv-ink); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); padding: 16px 18px 14px; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; animation: tvPop .35s cubic-bezier(.2, 1.4, .4, 1); transition: top .35s ease, left .35s ease; }
.tv-card .tv-n { display: inline-block; background: var(--tv-amber); color: var(--tv-ink); font-weight: 800; font-size: 12px; border-radius: 999px; padding: 2px 10px; letter-spacing: .5px; }
.tv-card h3 { margin: 8px 0 4px; font-size: 18px; }
.tv-card p { margin: 0 0 10px; color: var(--tv-muted); font-size: 14.5px; }
.tv-card p b { color: var(--tv-ink); }
.tv-row { display: flex; align-items: center; gap: 8px; }
.tv-dots { display: flex; gap: 5px; margin-right: auto; }
.tv-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d5dde2; }
.tv-dots i.on { background: var(--tv-brand); width: 18px; border-radius: 4px; }
.tv-btn { border: 0; border-radius: 10px; padding: 8px 14px; font: 700 14px system-ui, sans-serif; cursor: pointer; background: var(--tv-brand); color: #fff; }
.tv-btn.ghost { background: #eef3f5; color: var(--tv-ink); }
.tv-skip { border: 0; background: none; color: var(--tv-muted); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 4px; }
.tv-arrow { position: absolute; width: 16px; height: 16px; background: #fff; transform: rotate(45deg); }

/* little animated scene inside the card */
.tv-anim { position: relative; height: 92px; margin: 6px 0 8px; border-radius: 12px; background: linear-gradient(135deg, #0b7a75, #075955); overflow: hidden; }
.tv-anim span { position: absolute; font-size: 34px; line-height: 1; }
.tv-anim .bar { position: absolute; left: 16px; right: 16px; top: 40px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .2); }
.tv-anim .bar::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--tv-mint); animation: tvFill 2.4s ease-in-out infinite; }
/* receipts flying into a phone / folder */
.a-fly1 { left: 18px; top: 26px; animation: tvFly 2.4s ease-in infinite; }
.a-fly2 { left: 18px; top: 26px; animation: tvFly 2.4s ease-in .8s infinite; }
.a-fly3 { left: 18px; top: 26px; animation: tvFly 2.4s ease-in 1.6s infinite; }
.a-target { right: 22px; top: 22px; font-size: 44px !important; animation: tvBounce 2.4s ease-in-out infinite; }
.a-flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: tvFlash 2.4s ease-out infinite; }
.a-center { left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 46px !important; animation: tvBob 1.6s ease-in-out infinite; }
.a-left { left: 26px; top: 24px; animation: tvBob 1.6s ease-in-out infinite; }
.a-right { right: 26px; top: 24px; animation: tvBob 1.6s ease-in-out .5s infinite; }
.a-tick { right: 24px; bottom: 12px; font-size: 28px !important; opacity: 0; animation: tvTick 2.4s ease-out infinite; }
.a-bubble { left: 18px; top: 16px; background: #fff; color: var(--tv-ink); font: 600 13px system-ui, sans-serif !important; padding: 7px 10px; border-radius: 12px 12px 12px 3px; animation: tvIn 3s ease-out infinite; }
.a-reply { right: 18px; bottom: 14px; background: #25d366; color: #04210f; font: 600 13px system-ui, sans-serif !important; padding: 7px 10px; border-radius: 12px 12px 3px 12px; opacity: 0; animation: tvIn 3s ease-out 1s infinite; }
.a-bars { position: absolute; left: 24px; bottom: 14px; display: flex; gap: 8px; align-items: flex-end; height: 60px; }
.a-bars i { width: 18px; border-radius: 4px 4px 0 0; background: var(--tv-mint); animation: tvGrow 2.4s ease-in-out infinite; }
.a-bars i:nth-child(2) { animation-delay: .2s; } .a-bars i:nth-child(3) { animation-delay: .4s; } .a-bars i:nth-child(4) { animation-delay: .6s; }

/* welcome screen */
.tv-welcome { position: fixed; z-index: 82; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 560px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--tv-ink); animation: tvPopC .45s cubic-bezier(.2, 1.4, .4, 1); }
.tv-welcome .tv-top { background: linear-gradient(135deg, #0b7a75, #075955); color: #fff; padding: 22px 22px 18px; border-radius: 22px 22px 0 0; text-align: center; }
.tv-welcome .tv-top .w { font-size: 42px; display: inline-block; animation: tvWave 1.6s ease-in-out infinite; transform-origin: 70% 80%; }
.tv-welcome h2 { margin: 6px 0 2px; font-size: 22px; }
.tv-welcome .tv-top p { margin: 0; color: #cdeeea; }
.tv-steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px 16px 6px; position: relative; }
.tv-steps4::before { content: ""; position: absolute; left: 12%; right: 12%; top: 46px; height: 4px; border-radius: 2px; background: #e3ecee; }
.tv-steps4::after { content: ""; position: absolute; left: 12%; top: 46px; height: 4px; border-radius: 2px; background: var(--tv-brand); animation: tvLine 8s linear infinite; }
.tv-s { position: relative; z-index: 1; text-align: center; font-size: 12.5px; color: var(--tv-muted); }
.tv-s .ic { width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%; background: #eef6f5; border: 3px solid #e3ecee; display: flex; align-items: center; justify-content: center; font-size: 26px; animation: tvStep 8s ease-in-out infinite; }
.tv-s:nth-child(2) .ic { animation-delay: 2s; } .tv-s:nth-child(3) .ic { animation-delay: 4s; } .tv-s:nth-child(4) .ic { animation-delay: 6s; }
.tv-s b { display: block; color: var(--tv-ink); font-size: 13.5px; }
.tv-welcome .tv-foot { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px 18px 20px; flex-wrap: wrap; }
.tv-welcome .tv-note { text-align: center; color: var(--tv-muted); font-size: 13px; padding: 0 20px; margin: 6px 0 0; }

@keyframes tvFade { from { opacity: 0; } }
@keyframes tvPop { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes tvPopC { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); } }
@keyframes tvPulse { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
@keyframes tvFill { 0% { width: 4%; } 70%, 100% { width: 100%; } }
@keyframes tvFly { 0% { transform: translate(0, 0) rotate(-10deg) scale(1); opacity: 0; } 15% { opacity: 1; } 80% { transform: translate(230px, -4px) rotate(10deg) scale(.5); opacity: 1; } 100% { transform: translate(250px, 0) scale(.3); opacity: 0; } }
@keyframes tvBounce { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.18); } }
@keyframes tvFlash { 0%, 100% { opacity: 0; } 8% { opacity: .85; } 20% { opacity: 0; } }
@keyframes tvBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes tvTick { 0%, 45% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.2); } 75%, 100% { opacity: 1; transform: scale(1); } }
@keyframes tvIn { 0% { opacity: 0; transform: translateY(10px); } 15%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes tvGrow { 0% { height: 6px; } 60%, 100% { height: var(--h, 50px); } }
@keyframes tvWave { 0%, 60%, 100% { transform: rotate(0); } 15% { transform: rotate(18deg); } 30% { transform: rotate(-10deg); } 45% { transform: rotate(14deg); } }
@keyframes tvLine { 0% { width: 0; } 75%, 100% { width: 76%; } }
@keyframes tvStep { 0%, 100% { border-color: #e3ecee; transform: scale(1); } 6%, 22% { border-color: var(--tv-amber); background: #fff7e0; transform: scale(1.12); } 30% { transform: scale(1); } }

@media (max-width: 600px) {
  .tv-card { left: 12px !important; right: 12px; width: auto; top: auto !important; bottom: 12px; }
  .tv-card .tv-arrow { display: none; }
  .tv-steps4 { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .tv-steps4::before, .tv-steps4::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tv-anim *, .tv-welcome *, .tv-hole::after { animation: none !important; } }
@media print { .tv-dim, .tv-hole, .tv-card, .tv-welcome, .tv-block { display: none !important; } }
