/* Recap Screen — Stories-style 3-phase flow (post-match → loader → slides) */

/* ── Override .scroll defaults: recap manages its own layout ── */
#recapView {
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
}

/* ── Slide transition animations ── */
@keyframes rcSlideInRight  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes rcSlideInLeft   { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes rcSlideOutLeft  { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes rcSlideOutRight { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes rcSegFill       { from { width: 0%; } to { width: 100%; } }

/* ── Loader animations ── */
@keyframes rcOrbitBall {
  from { transform: rotate(0deg) translateX(72px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(72px) rotate(-360deg); }
}
@keyframes rcArcFill     { from { stroke-dashoffset: 452; } to { stroke-dashoffset: 0; } }
@keyframes rcProgressFull { from { width: 0%; } to { width: 100%; } }

/* ════════════════════════════════════════════════════════════════
   PHASE 1 — POST-MATCH SCREEN
════════════════════════════════════════════════════════════════ */

.rc-postmatch {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #07090D;
}

.rc-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

/* ── Drawer overlay ── */
.rc-drawer {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 30;
  align-items: flex-end;
}
.rc-drawer--open { display: flex; }

.rc-drawer-sheet {
  background: #172435;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 32px;
  width: 100%;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(.32, 1, .56, 1);
}
.rc-drawer--open .rc-drawer-sheet { transform: translateY(0); }

/* ── Slide-count picker buttons ── */
.rc-cnt-btn {
  flex: 1;
  height: 40px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  border-radius: 10px;
  transition: background 150ms, color 150ms;
}
.rc-cnt-btn--active {
  background: #10B981;
  color: #022C22;
  font-weight: 900;
}

/* ── Tone picker buttons ── */
.rc-tone-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #07090D;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  padding: 10px 16px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 150ms;
}
.rc-tone-btn--active { border-color: #75AADB; }
.rc-tone-btn span { font-size: 13px; font-weight: 600; color: #94A3B8; transition: color 150ms; }
.rc-tone-btn--active span { color: #F1F5F9; }
.rc-tone-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

/* ════════════════════════════════════════════════════════════════
   PHASE 2 — LOADER SCREEN
════════════════════════════════════════════════════════════════ */

.rc-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #07090D;
}

.rc-loader-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.rc-arc-track { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 2; }
.rc-arc-fill {
  fill: none; stroke: #10B981; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 452 452; stroke-dashoffset: 452;
  transform: rotate(-90deg); transform-origin: 80px 80px;
}
.rc-arc-fill--on { animation: rcArcFill 4.2s ease-in-out forwards; }

.rc-loader-bar-track {
  width: 200px; height: 3px;
  background: rgba(255,255,255,.06);
  border-radius: 2px; overflow: hidden;
  margin-bottom: 48px;
}
.rc-loader-bar { height: 100%; width: 0%; background: #10B981; border-radius: 2px; }
.rc-loader-bar--on { animation: rcProgressFull 4.2s ease-in-out forwards; }

.rc-phrase { transition: opacity 280ms, transform 280ms; }

/* ════════════════════════════════════════════════════════════════
   PHASE 3 — SLIDES SCREEN
════════════════════════════════════════════════════════════════ */

/* Individual slide — stacked, off-screen by default */
.rc-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  will-change: transform;
}
.rc-slide--current       { transform: translateX(0); }
.rc-slide--exit-left     { animation: rcSlideOutLeft  260ms ease-in  forwards; }
.rc-slide--exit-right    { animation: rcSlideOutRight 260ms ease-in  forwards; }
.rc-slide--enter-right   { animation: rcSlideInRight  280ms ease-out forwards; }
.rc-slide--enter-left    { animation: rcSlideInLeft   280ms ease-out forwards; }

/* Background photo layer */
.rc-slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.rc-slide-bg-overlay { position: absolute; inset: 0; z-index: 1; }

/* Top chrome */
.rc-slide-chrome { position: relative; z-index: 20; padding-top: 50px; }
.rc-progress-row { display: flex; gap: 5px; padding: 0 14px; margin-bottom: 10px; }

.rc-seg {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.25);
  overflow: hidden; position: relative;
}
.rc-seg--done { background: rgba(255,255,255,.9); }
.rc-seg-fill {
  position: absolute; inset: 0 100% 0 0;
  background: rgba(255,255,255,.9); border-radius: 2px;
}
.rc-seg--active .rc-seg-fill { animation: rcSegFill 6s linear forwards; }

.rc-slide-header { display: flex; align-items: center; padding: 0 20px; }
.rc-slide-back {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.8);
  background: none; border: none; cursor: pointer; font-family: inherit; padding: 0;
}
.rc-slide-wordmark {
  flex: 1; text-align: center;
  font-size: 13px; font-weight: 900; color: #fff; letter-spacing: .1em;
}
.rc-slide-counter {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.6);
  min-width: 36px; text-align: right;
}
.rc-slide-home {
  background: none; border: none; cursor: pointer; padding: 0;
  color: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center;
  min-width: 36px; text-align: right;
}

/* Invisible tap zones */
.rc-tap-prev {
  position: absolute; left: 0; top: 0; bottom: 80px;
  width: 35%; z-index: 30; cursor: pointer;
}
.rc-tap-next {
  position: absolute; right: 0; top: 0; bottom: 80px;
  width: 65%; z-index: 30; cursor: pointer;
}

/* Bottom action bar */
.rc-slide-actions {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 20; background: rgba(7,9,13,.95);
  padding: 14px 20px 24px; backdrop-filter: blur(12px);
}
.rc-action-row { display: flex; gap: 12px; margin-bottom: 8px; }

.rc-btn-dl {
  flex: 1; height: 48px; background: #172435;
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; font-family: inherit; transition: background 150ms;
}
.rc-btn-dl:active { background: #1E2E3E; }

.rc-btn-share {
  flex: 1; height: 48px; background: #10B981;
  border: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; font-family: inherit; transition: opacity 150ms;
}
.rc-btn-share:active { opacity: .85; }

.rc-slide-label { font-size: 11px; color: #475569; text-align: center; }

/* ── Per-slide content areas ── */
.rc-s1-content {
  position: absolute; bottom: 90px; left: 0; right: 0;
  z-index: 10; padding: 0 24px 24px;
}
.rc-s2-content {
  position: absolute; bottom: 100px; left: 0; right: 0;
  z-index: 10; padding: 0 24px 24px; text-align: center;
}
.rc-s3-grid {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  z-index: 0;
}
.rc-s3-cell { position: relative; overflow: hidden; }
.rc-s3-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-s3-cell::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.rc-s3-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 1; }
.rc-s3-card {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center; padding: 0 20px;
}
.rc-s3-card-inner {
  background: rgba(7,9,13,.88); border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px; padding: 20px 24px; width: 100%;
  text-align: center; backdrop-filter: blur(8px);
}
.rc-s4-content {
  position: absolute; bottom: 90px; left: 0; right: 0;
  z-index: 10; padding: 0 24px 24px;
}
.rc-s5-content {
  position: absolute; top: 50%; transform: translateY(-50%);
  left: 0; right: 0; z-index: 10; padding: 0 32px; text-align: center;
}

/* ── Error state (inline fallback) ── */
.rc-error {
  position: absolute; inset: 0; background: #07090D;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 32px 24px; text-align: center;
}
.rc-error__back {
  position: absolute; top: 16px; left: 16px;
  background: none; border: none; color: #75AADB;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
