/* ============================================================
   Guess the Painter — Phase 4: Review Pill + Result Modal
   redesign-modal.css — scoped under .gtp to preserve legacy styles.
   2026-05 redesign branch.
   ============================================================ */

/* ============================================================
   REVIEW PILL
   ============================================================ */
.gtp-review-pill-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  pointer-events: auto;
}
/* No previous painting yet (first question) → hide the strip entirely. */
.gtp-review-pill-wrap.gtp-pill-disabled { display: none; }

/* .gtp prefix (0,2,0) beats tokens.css `.gtp button {background:none;padding:0}`
   (0,1,1) — without it the strip was transparent + collapsed, only showing
   ink on :hover. THIS was the recurring "strip isn't always black" bug. */
.gtp .gtp-review-pill,
.gtp-review-pill {
  width: 100%;
  background: var(--ink);   /* always ink — never transparent */
  color: var(--paper);
  border: 0;
  border-top: 1px solid var(--ink-2);
  border-radius: 0;
  padding: 9px 24px;        /* slim strip — never eats the last option */
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition:
    background 180ms ease;
  -webkit-tap-highlight-color: transparent;
  gap: 0;
}

.gtp-review-pill:hover,
.gtp-review-pill:focus-visible {
  background: var(--ink-2);
  outline: none;
}

.gtp-review-pill:active {
  background: var(--ink-2);
}

/* Pill left: thumbnail + text */
.gtp-review-pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

/* Thumbnail */
.gtp-review-pill-thumb {
  width: 28px;
  height: 34px;
  flex: 0 0 28px;
  border-radius: 1px;
  overflow: hidden;
  background: rgba(245, 240, 230, 0.1);
}

.gtp-review-pill-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text group */
.gtp-review-pill-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.gtp-review-pill-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(245, 240, 230, 0.55);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.gtp-review-pill-title {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* Pill right: chevron */
.gtp-review-pill-chevron {
  font-family: var(--mono);
  font-size: 18px;
  color: rgba(245, 240, 230, 0.7);
  flex: 0 0 auto;
  margin-left: 12px;
  line-height: 1;
}

/* ============================================================
   RESULT MODAL BACKDROP
   ============================================================ */
.gtp-result-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.96);
  z-index: 1000;
  display: flex;
  align-items: flex-end;     /* mobile: bottom sheet */
  justify-content: center;
  opacity: 0;
  transition: opacity 280ms ease-out;
  pointer-events: none;
}

.gtp-result-backdrop.gtp-modal-open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   MODAL CARD (shared shell)
   ============================================================ */
.gtp-result-modal {
  background: var(--paper);
  box-shadow: var(--shadow-deep);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform 320ms ease-out,
    opacity 280ms ease-out;
}

.gtp-result-backdrop.gtp-modal-open .gtp-result-modal {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================================
   MOBILE BOTTOM SHEET (< 720px)
   ============================================================ */
@media (max-width: 719px) {
  .gtp-result-backdrop {
    align-items: flex-end;
  }

  .gtp-result-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    flex-direction: column;
  }

  /* Sticky header */
  .gtp-rm-mobile-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }

  .gtp-rm-mobile-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .gtp-rm-mobile-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--ink-3);
    text-transform: uppercase;
  }

  .gtp-rm-scrollable {
    overflow-y: auto;
    flex: 1;
    min-height: 0;   /* allow the flex child to shrink so it actually scrolls */
    -webkit-overflow-scrolling: touch;
  }

  /* Hide desktop columns on mobile */
  .gtp-rm-left-panel { display: none; }
  /* The right panel is the modal's flex child — make it a column that fills
     the sheet so the inner .gtp-rm-scrollable can actually scroll. */
  .gtp-rm-right-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .gtp-rm-hero-img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    display: block;
    background: var(--paper-2);
  }

  .gtp-rm-body {
    padding: 22px 24px 24px;
  }

  .gtp-rm-title {
    font-family: var(--serif);
    font-size: 30px !important;
    font-weight: 500;
    font-style: italic;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--ink);
  }

  .gtp-rm-artist-year {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink-2);
    margin-top: 6px;
  }

  .gtp-rm-desc {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-2);
    margin-top: 20px;
  }
}

/* ============================================================
   DESKTOP CENTERED CARD (>= 720px)
   ============================================================ */
@media (min-width: 720px) {
  .gtp-result-backdrop {
    align-items: center;
    transform: none;
  }

  .gtp-result-modal {
    width: min(1080px, calc(100vw - 48px));
    max-height: 820px;
    height: 820px;
    border-radius: 6px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    transform: scale(0.96);
    opacity: 0;
  }

  .gtp-result-backdrop.gtp-modal-open .gtp-result-modal {
    transform: scale(1);
    opacity: 1;
  }

  .gtp-rm-mobile-header { display: none; }
  .gtp-rm-scrollable { display: contents; }

  /* LEFT PANEL — ink bg, painting */
  .gtp-rm-left-panel {
    background: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
    min-width: 0;
  }

  .gtp-rm-left-caption {
    position: absolute;
    top: 24px;
    left: 24px;
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(245, 240, 230, 0.5);
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .gtp-rm-left-img-wrap {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }

  .gtp-rm-left-img-box {
    position: relative;
    width: 480px;
    height: 600px;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gtp-rm-left-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 2px;
  }

  .gtp-rm-left-meta {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    color: rgba(245, 240, 230, 0.5);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }

  /* RIGHT PANEL — scrollable content */
  .gtp-rm-right-panel {
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    min-width: 0;
  }

  .gtp-rm-body {
    padding: 40px 44px;
  }

  .gtp-rm-hero-wrap { display: none; }

  .gtp-rm-title {
    font-family: var(--serif);
    font-size: 48px !important;
    font-weight: 500;
    font-style: italic;
    line-height: 1;
    letter-spacing: -0.01em;
    margin: 14px 0 6px;
    color: var(--ink);
  }

  .gtp-rm-artist-year {
    font-family: var(--serif);
    font-size: 22px;
    color: var(--ink-2);
    margin-top: 0;
  }

  .gtp-rm-desc {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.5;
    color: var(--ink-2);
    margin-top: 22px;
  }
}

/* ============================================================
   CLOSE BUTTON
   ============================================================ */
.gtp-rm-close {
  width: 36px;
  height: 36px;
  background: var(--paper-2);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  z-index: 10;
  transition: background 160ms;
  flex-shrink: 0;
}

.gtp-rm-close:hover { background: var(--rule); }

/* Desktop: absolute-positioned close in right panel */
@media (min-width: 720px) {
  .gtp-rm-right-panel > .gtp-rm-close {
    position: absolute;
    top: 20px;
    right: 20px;
  }
  /* Hide the mobile-only close inside the mobile header on desktop */
  .gtp-rm-close-mobile { display: none; }
}

/* Mobile: the close in mobile header, not absolute */
@media (max-width: 719px) {
  /* Hide the desktop absolute close on mobile (mobile header has its own) */
  .gtp-rm-right-panel > .gtp-rm-close:not(.gtp-rm-close-mobile) {
    display: none;
  }
}

/* ============================================================
   EYEBROW (PLATE NN · MOVEMENT)
   ============================================================ */
.gtp-rm-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ochre-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0;
}

/* ============================================================
   ARTIST · YEAR
   ============================================================ */
.gtp-rm-year {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

@media (max-width: 719px) {
  .gtp-rm-year {
    font-size: 12px;
  }
}

/* ============================================================
   HOW TO IDENTIFY CALLOUT
   ============================================================ */
.gtp-rm-callout {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--paper-2);
  border-left: 3px solid var(--ochre);
}

@media (min-width: 720px) {
  .gtp-rm-callout {
    margin-top: 22px;
    padding: 18px 22px;
  }
}

.gtp-rm-callout-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ochre-deep);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

@media (min-width: 720px) {
  .gtp-rm-callout-eyebrow {
    letter-spacing: 0.18em;
    margin-bottom: 8px;
  }
}

.gtp-rm-callout-body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

@media (min-width: 720px) {
  .gtp-rm-callout-body {
    font-size: 19px;
  }
}

/* ============================================================
   ACCORDION
   ============================================================ */
.gtp-rm-accordion {
  margin-top: 28px;
}

.gtp-rm-accordion-item {
  border-top: 1px solid var(--rule);
}

.gtp-rm-accordion-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  gap: 12px;
}

.gtp-rm-accordion-label {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  line-height: 1.2;
  flex: 1;
}

.gtp-rm-accordion-icon {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink-3);
  flex: 0 0 auto;
  transition: transform 220ms ease;
  line-height: 1;
}

.gtp-rm-accordion-item.open .gtp-rm-accordion-icon {
  transform: rotate(45deg);
}

.gtp-rm-accordion-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 320ms ease,
    opacity 220ms ease;
}

.gtp-rm-accordion-item.open .gtp-rm-accordion-body {
  max-height: 1400px;
  opacity: 1;
}

.gtp-rm-accordion-text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 18px;
  padding-bottom: 2px;
}

/* ============================================================
   FOOTER BUTTONS (desktop right panel + mobile bottom)
   ============================================================ */
.gtp-rm-footer {
  margin-top: 28px;
  padding-bottom: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.gtp-rm-btn-back {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 14px 22px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms;
  white-space: nowrap;
}

.gtp-rm-btn-back:hover { background: var(--ink-2); }

/* Report icons (wrong image / visible signature) under the back button.
   `.gtp` prefix beats the `.gtp button` reset so padding/border/colour land. */
/* Report icons overlaid on the painting — always visible, no scroll needed */
/* NB: only position here — the desktop media query sets display:none, and a
   `display` here (later in source, same specificity) would override it. */
.gtp-rm-hero-wrap { position: relative; }

.gtp-rm-report-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 6;
}
.gtp-rm-report-overlay-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(28,26,23,0.62);
  padding: 5px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.gtp .gtp-rm-report-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(28,26,23,0.72);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 160ms, transform 160ms, border-color 160ms;
}
@media (hover: hover) {
  .gtp .gtp-rm-report-icon:hover:not(.is-done) { background: var(--ink); transform: translateY(-1px); }
}
.gtp .gtp-rm-report-icon:active:not(.is-done) { background: var(--ink); }
.gtp .gtp-rm-report-icon.is-done {
  background: rgba(91,122,58,0.92);
  border-color: rgba(255,255,255,0.5);
  cursor: default;
}

/* ============================================================
   ACCORDION CLOSING RULE (matches last border-top div in prototype)
   ============================================================ */
.gtp-rm-accordion-cap {
  border-top: 1px solid var(--rule);
}

/* ============================================================
   MOBILE BRANDMARK TEXT
   ============================================================ */
.gtp-rm-brandmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
}

.gtp-rm-brandmark-logo {
  height: 22px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

/* ============================================================
   BODY PADDING ADJUSTMENT when pill is visible
   ============================================================ */
.gtp-game-body.gtp-pill-visible {
  padding-bottom: 90px;
}

/* Review pill: always present, disabled on Q1 */
.gtp-review-pill-wrap.gtp-pill-disabled {
  pointer-events: none;
}

.gtp-review-pill-wrap.gtp-pill-disabled .gtp-review-pill {
  opacity: 0.4;
  cursor: default;
}

.gtp-review-pill-wrap.gtp-pill-disabled .gtp-review-pill-thumb {
  background: rgba(245, 240, 230, 0.05);
}

.gtp-review-pill-wrap.gtp-pill-disabled .gtp-review-pill-thumb img {
  display: none;
}

/* Ensure the solo wrapper allows the pill to be visible */
#gtp-solo-wrapper {
  overflow: visible !important;
  position: absolute;
}
