/* ==========================================================================
   Shared components: logo, navbar, footer, time-zone bar, event card,
   countdown, video tile, modal, toast, progress meter, tabs, avatar
   ========================================================================== */

/* Logo -------------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 21px; letter-spacing: -.4px; }
.logo img { height: 40px; width: auto; mix-blend-mode: multiply; }
.logo .w-video { color: var(--teal-dark); }
.logo .w-match { color: var(--pink); }
.logo .w-date { color: var(--ink); }
.logo-sm { font-size: 18px; }
.logo-sm img { height: 32px; }
.logo-light .w-date { color: #fff; }
.logo-light img { mix-blend-mode: normal; background: #fff; border-radius: 10px; padding: 3px; }

/* Public navbar ----------------------------------------------------------- */
.navbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(251, 248, 250, .88); border-bottom: 1px solid var(--line); }
.navbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.navbar-links { display: flex; gap: 30px; font-weight: 500; color: var(--muted); font-size: 15px; }
.navbar-links a:hover, .navbar-links a.is-active { color: var(--ink); }
.navbar-cta { display: flex; gap: 8px; align-items: center; }

/* Footer ------------------------------------------------------------------ */
.footer { padding: 56px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink); margin-bottom: 14px; }
.footer ul { display: grid; gap: 10px; }
.footer a:hover { color: var(--ink); }
.footer-about p { margin-top: 12px; max-width: 300px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Time-zone room bar ------------------------------------------------------ */
.tzbar { background: var(--ink); color: #fff; }
.tzbar .wrap { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.tzbar-label { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tz-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tz-chip { background: rgba(255, 255, 255, .08); color: #cfd3e2; border: 1px solid rgba(255, 255, 255, .12); padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: all .2s; }
.tz-chip:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.tz-chip.is-on { background: var(--grad-teal); border-color: transparent; color: #fff; }
.tz-clock { margin-left: auto; font-size: 14px; color: #cfd3e2; }
.tz-clock b { color: #fff; }

/* Category tag ------------------------------------------------------------ */
.cat { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; align-self: flex-start; white-space: nowrap; }

/* Event card -------------------------------------------------------------- */
.ev { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 10px 28px rgba(27, 34, 56, .06); display: flex; flex-direction: column; gap: 12px; transition: transform .25s, box-shadow .25s; position: relative; border: 1.5px solid transparent; }
.ev:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(27, 34, 56, .12); }
.ev.is-live { border-color: var(--pink); }
.ev.is-registered { border-color: var(--teal); }
.ev.is-ended { opacity: .55; }
.ev-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ev-time { font-weight: 800; font-size: 15px; }
.ev h3 { font-size: 18px; line-height: 1.25; letter-spacing: -.3px; flex: 1; }
.ev-note { font-size: 12px; color: var(--muted); font-weight: 600; }
.ev .btn { width: 100%; }

/* Countdown --------------------------------------------------------------- */
.countdown { display: flex; gap: 10px; }
.countdown div { background: rgba(255, 255, 255, .18); border-radius: 14px; padding: 10px 0; width: 70px; text-align: center; backdrop-filter: blur(6px); }
.countdown b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }
.countdown-dark div { background: var(--bg); }
.countdown-dark span { color: var(--muted); }

/* Video tile (intro video thumbnail) -------------------------------------- */
.vtile { display: flex; flex-direction: column; gap: 10px; position: relative; }
.vtile-media { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; display: grid; place-items: center; cursor: pointer; transition: transform .3s, box-shadow .3s; }
.vtile-media:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(0, 0, 0, .22); }
.vtile-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%); }
.vtile-play { position: absolute; z-index: 2; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .2s; }
.vtile-media:hover .vtile-play { transform: scale(1.1); }
.vtile-play svg { width: 20px; height: 20px; margin-left: 3px; fill: var(--pink); }
.vtile-len { position: absolute; z-index: 2; bottom: 10px; right: 10px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.vtile-flag { position: absolute; z-index: 2; top: 10px; left: 10px; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.vtile-flag.is-busy { background: var(--red); color: #fff; }
.vtile-flag.is-busy::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.8s infinite; }
.vtile-flag.is-interested { background: #fff; color: var(--pink); }
.score-pill { position: absolute; z-index: 2; bottom: 10px; left: 10px; background: #fff; color: var(--teal-dark); font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.score-pill.is-top { background: var(--grad); color: #fff; }
.vtile-info span { display: block; }
.vtile-flag.is-demo { background: rgba(0, 0, 0, .45); color: #fff; }
.vtile-more { position: absolute; z-index: 3; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; display: grid; place-items: center; font-weight: 800; letter-spacing: 1px; }
.vtile-info b { font-size: 15px; display: block; }
.vtile-info span { font-size: 12px; color: var(--muted); }
.vtile-acts { display: flex; gap: 8px; }
.vtile-acts button { flex: 1; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1.5px solid var(--line); background: #fff; transition: transform .15s, background .2s, border-color .2s; }
.vtile-acts button:hover { transform: scale(1.04); }
.vtile-acts svg { width: 20px; height: 20px; }
.vtile.is-liked .vtile-media { box-shadow: 0 0 0 3px var(--pink); }
.vtile.is-liked [data-act="like"] { background: var(--tint-pink); border-color: var(--pink); }
.vtile.is-passed { opacity: .35; }
.vtile.is-matched .vtile-media { box-shadow: 0 0 0 3px var(--teal); }

/* Dark surfaces (room) */
.on-dark .vtile-info span { color: #b9c0d6; }
.on-dark .vtile-acts button { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
.on-dark .vtile.is-liked [data-act="like"] { background: rgba(232, 48, 94, .25); border-color: var(--pink); }

/* Modal ------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(27, 34, 56, .6); backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s; }
.modal.is-open { opacity: 1; }
.modal-box { background: #fff; border-radius: 28px; width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow: auto; position: relative; transform: scale(.92) translateY(10px); transition: transform .35s cubic-bezier(.2, 1.3, .4, 1); box-shadow: var(--shadow-lg); }
.modal.is-open .modal-box { transform: none; }
.modal-body { padding: 32px; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 20px; color: var(--muted); }
.modal-close:hover { background: var(--tint-pink); color: var(--pink); }
.modal-title { font-size: 26px; letter-spacing: -.6px; margin-bottom: 6px; }
.modal-center { text-align: center; }
.modal-center .btn { width: 100%; }

/* Toast ------------------------------------------------------------------- */
.toasts { position: fixed; z-index: 300; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 10px; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 16px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: toast-in .35s cubic-bezier(.2, 1.3, .4, 1); }
.toast.is-leaving { animation: toast-out .3s forwards; }
.toast-icon { font-size: 18px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* Progress meter ---------------------------------------------------------- */
.meter { display: grid; gap: 8px; }
.meter-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.meter-track { height: 10px; border-radius: 999px; background: #f0eef3; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--grad); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* Tabs -------------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; padding: 5px; background: #f3f0f5; border-radius: 14px; overflow-x: auto; }
.tab { flex: none; padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.tab.is-on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* Avatar ------------------------------------------------------------------ */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; position: relative; }
.avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.is-online::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid #fff; }

/* Empty state ------------------------------------------------------------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { font-size: 36px; margin-bottom: 8px; }

/* Mockup label ------------------------------------------------------------ */
.mock-note { position: fixed; bottom: 16px; left: 16px; z-index: 200; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 999px; opacity: .85; pointer-events: none; }

@media (max-width: 1000px) {
  .navbar-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .logo { font-size: 17px; gap: 6px; }
  .logo img { height: 32px; }
  .navbar-cta .btn-ghost { display: none; }
  .navbar-cta .btn { padding: 10px 16px; font-size: 14px; }
  .tz-clock { margin-left: 0; }
  .countdown div { width: 62px; }
  .modal-body { padding: 26px 22px; }
  .mock-note { display: none; }
}
/* Local demo test accounts (Rachel, Halima): "Test account" tag under "Likes you" */
.vtile-flag.is-test { background: #fff4e5; color: #a15c00; border: 1px solid #f5b54a; }
.vtile-flag.is-test.is-second { top: 42px; }
/* Footer: customer support contact (required by Stripe) */
.footer-contact { margin-top: 14px; font-size: 14px; line-height: 1.7; }
.footer-contact a, .footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
