/* TapShop — Screen documentation page layout
 * Used by every individual screen file to wrap the desktop + mobile artboards
 * in a consistent page shell with header, breadcrumb and state notes. */

.doc-page {
  min-height: 100vh;
  background: var(--surface-app);
  padding: 0;
}

.doc-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 22px var(--s-8);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}
.doc-crumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-small); color: var(--text-secondary); }
.doc-crumb a { color: var(--text-secondary); text-decoration: none; }
.doc-crumb a:hover { color: var(--brand-primary); }
.doc-crumb .sep { color: var(--text-tertiary); }
.doc-crumb .cur { color: var(--text-primary); font-weight: var(--fw-medium); }
.doc-crumb .idx {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 22px; padding: 0 6px;
  border-radius: 6px;
  background: var(--brand-primary); color: #fff;
  font-family: var(--font-num); font-size: 11px; font-weight: 600;
}

.doc-title-block { display: flex; flex-direction: column; gap: 4px; }
.doc-title { font-size: 26px; font-weight: var(--fw-semibold); letter-spacing: -0.015em; margin: 0; }
.doc-subtitle { color: var(--text-secondary); font-size: var(--fs-body); max-width: 720px; }

.doc-nav-btns { display: flex; align-items: center; gap: var(--s-2); }

.doc-section {
  padding: var(--s-8) var(--s-8) 0;
  display: flex; flex-direction: column; gap: var(--s-3);
}
.doc-section-title {
  font-size: var(--fs-micro); color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: var(--fw-semibold);
  display: flex; align-items: center; gap: 8px;
}
.doc-section-title::after { content: ''; flex: 1; height: 1px; background: var(--divider); }

.artboards {
  display: grid;
  gap: var(--s-8);
  padding: var(--s-3) var(--s-8) var(--s-8);
}
.artboards.two-col {
  grid-template-columns: 1fr;
}
@media (min-width: 1280px) {
  .artboards.two-col { grid-template-columns: minmax(0, 1fr) 470px; align-items: start; }
}
.artboards.single { grid-template-columns: 1fr; }
.artboards.mobile-row {
  grid-template-columns: repeat(auto-fill, 420px);
  justify-content: center;
}

.artboard {
  display: flex; flex-direction: column; gap: 14px;
}
.artboard-label {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}
.artboard-label .pill {
  font-family: var(--font-num);
  font-size: 11px;
  background: var(--surface);
  color: var(--text-tertiary);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  letter-spacing: 0.04em;
}
.artboard-label .pill.warm { background: var(--accent-warm-bg); color: var(--accent-warm-ink); border-color: var(--accent-warm-border); }
.artboard-label .pill.brand { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* Desktop browser frame */
.dt-frame {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-3);
  border: 1px solid var(--border);
}
.dt-chrome {
  height: 40px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px;
  background: #E8EFEE;
  border-bottom: 1px solid var(--border);
}
.dt-chrome .dot { width: 11px; height: 11px; border-radius: 50%; }
.dt-chrome .dot.r { background: #FE5F57; }
.dt-chrome .dot.y { background: #FEBC2E; }
.dt-chrome .dot.g { background: #28C840; }
.dt-chrome .url {
  margin: 0 auto 0 12px;
  flex: 1;
  height: 24px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 10px;
  color: var(--text-tertiary);
  font-size: var(--fs-micro);
  font-family: var(--font-num);
  max-width: 420px;
}
.dt-chrome .url::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--text-tertiary); margin-right: 8px; flex-shrink: 0;
}
.dt-viewport {
  height: 800px;
  overflow: hidden;
  background: var(--surface-app);
}
.dt-viewport.tall { height: 900px; }
.dt-viewport.short { height: 640px; }

/* Mobile device frame */
.mb-frame {
  width: 390px;
  border-radius: 48px;
  background: var(--bezel);
  padding: 11px;
  box-shadow: var(--shadow-3);
  margin: 0 auto;
  position: relative;
}
.mb-frame .mb-screen {
  border-radius: 38px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  width: 100%;
  height: 780px;
  display: flex; flex-direction: column;
}
.mb-statusbar {
  height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px 0 28px;
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}
.mb-statusbar .time { font-variant-numeric: tabular-nums; }
.mb-statusbar .icons { display: flex; align-items: center; gap: 5px; }
.mb-notch {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 118px; height: 32px; border-radius: 20px;
  background: var(--bezel);
  z-index: 6;
  pointer-events: none;
}
.mb-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}
.mb-content { flex: 1; overflow-y: auto; }
/* Hide scrollbar for clean shots */
.mb-content::-webkit-scrollbar { display: none; }
.dt-viewport::-webkit-scrollbar { display: none; }

/* Telegram chrome variant for the buyer-card-in-TG artboard */
.tg-frame .mb-screen .tg-chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px;
  height: 56px;
  background: linear-gradient(180deg, #5288C0 0%, #4C82BB 100%);
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}
.tg-frame .tg-back { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.tg-frame .tg-title-block { display: flex; flex-direction: column; gap: 0; flex: 1; min-width: 0; }
.tg-frame .tg-title { font-size: 15px; font-weight: 500; }
.tg-frame .tg-status { font-size: 12px; opacity: 0.85; }
.tg-frame .tg-close { margin-left: 4px; font-size: 22px; line-height: 1; }
.tg-frame .tg-main-btn {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #5288C0; color: #fff;
  height: 50px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Notes panel beside artboard */
.notes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.notes h4 { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); font-weight: var(--fw-semibold); margin: 0; }
.notes ul { margin: 0; padding-left: 18px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); }
.notes li { line-height: 1.5; }
.notes li b { color: var(--text-primary); font-weight: var(--fw-medium); }
.notes .state-list { padding: 0; list-style: none; }
.notes .state-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
}
.notes .state-list li:last-child { border-bottom: 0; }
.notes .state-list .dot {
  width: 8px; height: 8px; border-radius: 50%;
}

/* Bottom nav for next/prev between screens */
.doc-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-8);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ── Tweak: at very small page widths, just let artboards stack ── */
@media (max-width: 880px) {
  .doc-header { padding: 16px var(--s-4); flex-direction: column; align-items: flex-start; }
  .doc-section, .artboards, .doc-footer { padding-left: var(--s-4); padding-right: var(--s-4); }
  .dt-frame { display: none; } /* show only mobile in tiny preview */
}
