/* "See changes" tour (preview builds only; src/components/ChangeTour.astro). Adapted from Tel's Neeley
   walkthrough: a wipe slider (current site in red, new site in green), a step card and a Back / Next dock.
   Red and green carry meaning here (before and after), so they stay the same on both design options.
   The card marks Fixed / New with a tag, not a colored edge bar (Doug's design rules). */
.tour-btn, .tour-dock, .tour-label, .tour-panel, .tw-tag { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
.tour-btn { position: fixed; top: 96px; right: 16px; z-index: 70; background: #c8102e; color: #fff; border: 0; border-radius: 99px; padding: .7rem 1.2rem; font-weight: 700; font-size: .95rem; box-shadow: 0 6px 20px rgba(200,16,46,.4); cursor: pointer; }
.tour-btn:hover { background: #a50d26; }
.tour-btn::before { content: "\25CF  "; animation: tourpulse 1.6s infinite; }
@keyframes tourpulse { 50% { opacity: .3; } }

.tour-on { position: relative; outline: 4px solid #e01b3c; outline-offset: 6px; border-radius: 2px; z-index: 30; }
.tour-on.tour-after { outline-color: #1e9e57; }

.tour-label { position: fixed; left: 16px; bottom: 84px; z-index: 72; max-width: 430px; background: #fff; color: #1b2333; box-shadow: 0 10px 30px rgba(0,0,0,.25); border-radius: 10px; padding: .8rem 1rem .9rem; font-size: .93rem; line-height: 1.4; }
.tour-label .tl-top { display: flex; gap: .4rem; align-items: center; margin-bottom: .35rem; }
.tour-label .tl-n { background: #111; color: #fff; border-radius: 99px; font-size: .72rem; padding: .1rem .5rem; font-weight: 700; }
.tour-label .tl-kind { color: #fff; border-radius: 99px; font-size: .68rem; padding: .12rem .55rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #c8102e; }
.tour-label .tl-kind.new { background: #1e7a46; }
.tour-label strong { display: block; font-size: 1.02rem; margin: 0 0 .25rem; color: #111; }
.tour-label p { margin: 0; color: #3d4757; }
.tour-label p + p { margin-top: .3rem; }
.tour-label p b { color: #111; }

.tour-wipe { position: absolute; inset: 0; z-index: 5; cursor: ew-resize; }
.tw-old { position: absolute; inset: 0; background: #fff; overflow: hidden; }
.tw-old > img { width: 100%; height: 100%; object-fit: contain; object-position: top center; display: block; }
.tw-handle { position: absolute; top: 0; bottom: 0; width: 4px; background: #e01b3c; transform: translateX(-2px); cursor: ew-resize; touch-action: none; z-index: 3; }
.tw-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #e01b3c; color: #fff; border-radius: 99px; padding: .35rem .6rem; font-size: .75rem; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.tw-tag { position: absolute; top: 8px; z-index: 4; font-weight: 700; font-size: .72rem; padding: .2rem .5rem; border-radius: 3px; letter-spacing: .08em; color: #fff; text-transform: uppercase; pointer-events: none; }
.tw-l { left: 8px; background: #e01b3c; } .tw-r { right: 8px; background: #1e9e57; }

.tour-backdrop { position: fixed; inset: 0; background: rgba(10,15,30,.6); z-index: 68; }
.tour-panel { position: fixed; z-index: 69; left: 50%; top: 50%; transform: translate(-50%, -56%); width: min(1000px, calc(100vw - 32px)); background: #fff; color: #1b2333; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.45); outline: 4px solid #1e9e57; outline-offset: 4px; overflow: hidden; }
.tp-stage { position: relative; min-height: 340px; max-height: calc(100vh - 250px); overflow: hidden; }
.tp-new, .tp-oldin { padding: 2.8rem 1.6rem 1.4rem; font-size: .98rem; line-height: 1.45; }
.tp-oldin { background: #fff6f6; height: 100%; }
.tp-new { background: #f4faf6; }
.tp-shot { display: flex; justify-content: center; }
.tp-shot img { display: block; max-width: 100%; max-height: calc(100vh - 340px); height: auto; border: 1px solid #d5dbe3; border-radius: 6px; }
.tp-phones { display: flex; justify-content: center; }
.tp-phones img { height: min(54vh, 520px); width: auto; border-radius: 22px; border: 7px solid #111; display: block; }
.tp-cap { text-align: center; font-size: .9rem; color: #3d4757; margin: .7rem auto 0; max-width: 560px; }
.tp-serp { margin: 0 0 1.25rem; max-width: 660px; font-family: Arial, sans-serif; }
.tp-serp .s-url { color: #202124; font-size: .85rem; }
.tp-serp .s-t { color: #1a0dab; font-size: 1.25rem; margin: .15rem 0; }
.tp-serp .s-d { color: #4d5156; font-size: .92rem; }
.tp-code { background: #0f1724; color: #e6edf6; padding: 1rem; border-radius: 8px; font-size: .8rem; white-space: pre-wrap; margin: 0; font-family: Consolas, "Courier New", monospace; }
.tp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.tp-stats div { background: #fff; border: 1px solid #f0c9cf; border-radius: 8px; padding: .8rem; font-size: .85rem; color: #555; }
.tp-stats.ok div { border-color: #bfe3cc; }
.tp-stats b { display: block; font-size: 1.7rem; font-weight: 800; color: #c8102e; line-height: 1.1; }
.tp-stats.ok b { color: #1e7a46; }
.tp-note { font-size: .85rem; color: #5d6676; margin: .9rem 0 0; }
.tp-list { font-size: 1.02rem; line-height: 1.8; margin: 0; padding-left: 1.2rem; }
.tp-tab { border-collapse: collapse; width: 100%; font-size: .92rem; background: #fff; }
.tp-tab th, .tp-tab td { border: 1px solid #e3e3e3; padding: .45rem .6rem; text-align: left; vertical-align: top; }
.tp-tab th { background: #f5f7fa; }

.tour-dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 73; background: #111; color: #fff; border-radius: 99px; padding: .45rem .55rem; display: flex; align-items: center; gap: .6rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-weight: 600; font-size: .88rem; width: min(780px, calc(100vw - 24px)); }
.td-btn { background: #2b2f3a; color: #fff; border: 0; border-radius: 99px; padding: .5rem .9rem; font: inherit; cursor: pointer; white-space: nowrap; }
.td-btn:hover:not([disabled]) { background: #3c4252; }
.td-btn[disabled] { opacity: .35; cursor: default; }
.td-next { background: #c8102e; } .td-next:hover { background: #a50d26 !important; }
.td-exit { padding: .5rem .7rem; }
.td-mid { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.td-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-bar { height: 4px; background: #333; border-radius: 99px; overflow: hidden; }
.td-bar i { display: block; height: 100%; background: #1e9e57; }

/* the A/B switcher sits bottom left; while the tour runs it steps aside */
html.tour-running #cl-switcher { display: none; }

@media (max-width: 760px) {
  .tour-btn { top: auto; bottom: 76px; right: 12px; padding: .55rem .9rem; font-size: .85rem; }
  html.tour-running .tour-btn { display: none; }
  .tour-label { left: 12px; right: 12px; bottom: 76px; max-width: none; font-size: .86rem; }
  .tour-dock { bottom: 12px; gap: .35rem; }
  .td-btn { padding: .45rem .7rem; }
  .td-t { font-size: .78rem; }
  .tp-stats { grid-template-columns: 1fr 1fr; }
  .tp-new, .tp-oldin { padding: 2.6rem 1rem 1rem; font-size: .9rem; }
  .tour-panel { top: 12px; transform: translateX(-50%); }
  .tp-stage { max-height: calc(100vh - 290px); }
}
.tour-dock[hidden], .tour-label[hidden], [hidden].tour-btn { display: none !important; }
@media print { .tour-btn, .tour-dock, .tour-label, .tour-panel, .tour-backdrop, .tour-wipe { display: none !important; } }
