/**
 * AjaMentor Component Styles — shared across all screens
 * Depends on tokens.css
 */

/* ============ Mockup Shell Header (global theme dock) ============ */
/* Injected by system/shell-header.js on every detail page so users can
   switch themes / jump home without going back to mockups/index.html.
   Visual parity with the .theme-dock used in index.html, but uses a
   distinct class namespace (`mockup-shell-*`) to avoid style collisions. */
.mockup-shell-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(12px);
  /* Allow horizontal scroll on small screens — keeping the dock visible on
     mobile is more valuable than hiding it (theme switching is the point). */
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
}
.mockup-shell-brand {
  font: 700 15px/1 var(--font-family);
  color: var(--color-text);
  letter-spacing: var(--tracking-normal);
  padding-right: 16px;
  border-right: 1px solid var(--color-border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.mockup-shell-brand:hover { opacity: 0.9; }
.mockup-shell-mark {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  text-align: center;
  line-height: 22px;
  font-weight: 900;
  margin-right: 8px;
  vertical-align: middle;
}
.mockup-shell-label {
  font: 600 11px/1 var(--font-family);
  color: var(--color-text-weak);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}
.mockup-shell-options {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.mockup-shell-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font: 500 13px/1 var(--font-family);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
  cursor: pointer;
  transition: all 120ms ease;
  flex-shrink: 0;
}
.mockup-shell-btn:hover {
  border-color: var(--color-text);
  transform: translateY(-1px);
}
.mockup-shell-btn.is-active {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-surface);
}
.mockup-shell-swatch {
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 50%;
}
.mockup-shell-url-hint {
  font: var(--font-caption);
  color: var(--color-text-weak);
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
  flex-shrink: 0;
}
.mockup-shell-url-hint code {
  background: var(--color-surface-subtle);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
}

/* The mobile-canvas in tokens.css already centers itself via margin: 32px auto.
   The sticky shell header sits above it without affecting that centering. */

/* ============ App Bar ============ */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 8px;
  background: var(--color-surface);
}
.app-bar.with-back { gap: 4px; justify-content: flex-start; }
.app-bar-title {
  font: 600 17px/1.2 var(--font-family);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  flex: 1;
  text-align: center;
  margin-right: 36px; /* balance back button */
}
.app-bar-title-sub {
  display: block;
  font: var(--font-caption);
  font-weight: 400;
  color: var(--color-text-weak);
  letter-spacing: var(--tracking-tight);
  margin-top: 2px;
}
.wordmark {
  font: 700 18px/1 var(--font-family);
  letter-spacing: -0.2px;
  color: var(--color-text);
}
.wordmark .accent { color: var(--color-primary); }
.app-bar-actions { display: flex; gap: 14px; align-items: center; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: var(--color-text);
  flex-shrink: 0;
}
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-error);
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #cdd8ec, #e5ebf7);
  display: inline-block;
}

/* ============ Search input (read-only placeholder style) ============ */
.search-wrap { padding: 4px 20px 12px; }
.search {
  display: flex; align-items: center; gap: 10px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-weak);
  font: var(--font-body);
  letter-spacing: var(--tracking-tight);
}

/* ============ Mentor card (horizontal — list view) ============ */
.mentor-row {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.mentor-row-photo {
  width: 84px; height: 84px;
  border-radius: var(--radius-md);
  flex: 0 0 84px;
  overflow: hidden;
  position: relative;
}
.mentor-row-body { flex: 1; min-width: 0; }
.mentor-row-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.mentor-row-name {
  font: 600 16px/1.2 var(--font-family);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
.mentor-row-school {
  font: var(--font-caption);
  color: var(--color-text-weak);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 8px;
}
.mentor-row-tags { display: flex; gap: 4px; margin-bottom: 10px; }
.mentor-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
}
.mentor-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============ Rating + Price helper ============ */
.rating {
  font: 600 13px/1 var(--font-family);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
.rating-count { color: var(--color-text-weak); font-weight: 400; margin-left: 2px; }
.price {
  font: 600 14px/1 var(--font-family);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}
.price-unit { color: var(--color-text-weak); font-weight: 400; margin-left: 2px; }

/* ============ Filter chip row (horizontal scroll) ============ */
.filter-row {
  display: flex;
  gap: 8px;
  padding: 4px 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }

/* ============ Section spacing helper ============ */
.section {
  padding: var(--space-6) var(--space-5);
}
.section-title {
  font: 600 18px/1.3 var(--font-family);
  letter-spacing: var(--tracking-normal);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.section-title-row .section-title { margin: 0; }
.section-title-row .link {
  font: var(--font-caption-strong);
  color: var(--color-text-weak);
  letter-spacing: var(--tracking-tight);
}

/* ============ Bottom Tab Bar ============ */
.tab-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
  z-index: 10;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0;
  color: var(--color-text-weak);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
}
.tab.is-active { color: var(--color-primary); }
.tab svg { stroke-width: 1.6; }

/* ============ Fixed bottom CTA ============ */
.bottom-cta {
  position: sticky;
  bottom: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 10;
}
.bottom-cta-summary {
  flex: 1;
  min-width: 0;
}
.bottom-cta-price {
  font: 600 15px/1 var(--font-family);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
.bottom-cta-price-sub {
  display: block;
  font: var(--font-caption);
  color: var(--color-text-weak);
  margin-top: 2px;
}

/* ============ Progress indicator (top of checkout flow) ============ */
.progress {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 20px 8px;
  font: var(--font-caption-strong);
  color: var(--color-text-weak);
  letter-spacing: var(--tracking-tight);
}
.progress-bar {
  flex: 1;
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 200ms ease;
}
