/* ─── FRQ Exam Select Page ─────────────────────────────────────────────── */

.frq-select-page .page--dashboard {
  position: relative;
  overflow: visible;
  min-height: 100vh;
}

.frq-select-content {
  padding: 0;
  position: relative;
  min-height: 100vh;
  /* Width reserved for the tree lane. The content lane below subtracts this
     so the two can never overlap, regardless of viewport width. */
  --frq-tree-w: clamp(280px, 22vw, 460px);
  --frq-lane-gap: 16px;
}

/* ─── Tree illustration — visual size is decoupled from the lane reservation
     variable so the tree can be larger without affecting the content column.
     top: -90px ≈ 3 card heights (3 × ~84px) above the content boundary so the
     canopy curve sits just above the top card row on wide screens. ─── */
.frq-select-scene {
  position: absolute;
  top: 26px;
  right: 40px;
  width: clamp(518px, 50vw, 960px);
  pointer-events: none;
  z-index: 0;
}

.frq-select-tree {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.05);
  transform-origin: bottom;
}

/* ─── Inner content wrapper — fills the usable area ─── */
.frq-select-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 48px 40px 80px;
}

/* ─── Content lane — search + cards + banner, never overlaps the tree ─── */
.frq-select-column {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(1250px, calc(100% - var(--frq-tree-w) - var(--frq-lane-gap)));
}

/* ─── Back link ─── */
.frq-select-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.15s;
}

.frq-select-back:hover {
  color: #374151;
}

/* ─── Hero ─── */
.frq-select-hero {
  margin-top: 44px;
  margin-bottom: 24px;
}

.frq-select-title {
  font-size: 3rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 14px;
}

.frq-select-subtitle {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  max-width: 500px;
}

/* ─── Search bar ─── */
.frq-select-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid #ddd8d0;
  border-radius: 14px;
  padding: 0 20px;
  height: 58px;
  margin-bottom: 36px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.frq-select-search-wrap:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.frq-select-search-icon {
  color: #9ca3af;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.frq-select-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: #1f2937;
  font-family: inherit;
}

.frq-select-search-input::placeholder {
  color: #b0aaa2;
}

.frq-select-search-chevron {
  color: #b0aaa2;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* ─── Section label ─── */
.frq-exams-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9ca3af;
  margin: 0 0 16px;
}

/* ─── Exam grid ─── */
.frq-exams-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
}

/* ─── Exam card ─── */
.frq-exam-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1.5px solid #e8e3da;
  border-radius: 14px;
  padding: 18px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.frq-exam-card:hover {
  border-color: #c5beb4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.frq-exam-card:active {
  transform: translateY(0);
}

.frq-exam-card--unavailable {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ─── Icon circles ─── */
.frq-exam-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
}

.frq-exam-icon--purple  { background: #ede9fe; color: #7c3aed; }
.frq-exam-icon--green   { background: #dcfce7; color: #16a34a; }
.frq-exam-icon--blue    { background: #dbeafe; color: #2563eb; }
.frq-exam-icon--emerald { background: #d1fae5; color: #059669; }
.frq-exam-icon--orange  { background: #ffedd5; color: #ea580c; }
.frq-exam-icon--sky     { background: #e0f2fe; color: #0284c7; }
.frq-exam-icon--indigo  { background: #e0e7ff; color: #4338ca; }
.frq-exam-icon--teal    { background: #ccfbf1; color: #0d9488; }
.frq-exam-icon--rose    { background: #fee2e2; color: #dc2626; }

/* ─── Card text ─── */
.frq-exam-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.frq-exam-name {
  font-size: 0.9rem;
  font-weight: 650;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frq-exam-category {
  font-size: 0.775rem;
  color: #9ca3af;
}

.frq-exam-arrow {
  color: #c9c3bb;
  flex-shrink: 0;
}

/* ─── No results ─── */
.frq-no-results {
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
  padding: 24px 0;
  margin: 0;
}

/* ─── Request banner ─── */
.frq-request-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fefce8;
  border: 1.5px solid #fde68a;
  border-radius: 16px;
  padding: 22px 28px;
  width: 100%;
}

.frq-request-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fef9c3;
  color: #ca8a04;
  flex-shrink: 0;
}

.frq-request-text {
  flex: 1;
}

.frq-request-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px;
}

.frq-request-desc {
  font-size: 0.84rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.frq-request-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #7c3aed;
  background: #fff;
  border: 1.5px solid #7c3aed;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.frq-request-btn:hover {
  background: #7c3aed;
  color: #fff;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
/* Mid widths: shrink the tree lane and drop to a 2-column grid so the cards
   stay comfortably sized. The calc() above keeps the lanes from colliding. */
@media (max-width: 1280px) {
  .frq-select-content {
    --frq-tree-w: clamp(260px, 26vw, 400px);
  }
  .frq-exams-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Keep tree at a sane position on mid-size screens */
  .frq-select-scene {
    top: 120px;
    right: 0;
    width: clamp(300px, 30vw, 460px);
  }
}

/* Narrow: hide the tree entirely and let content use the full width. */
@media (max-width: 760px) {
  .frq-select-content {
    --frq-tree-w: 0px;
    --frq-lane-gap: 0px;
  }
  .frq-select-scene {
    display: none;
  }
  .frq-select-inner {
    padding: 28px 20px 48px;
  }
  .frq-select-title {
    font-size: 2rem;
  }
  .frq-exams-grid {
    grid-template-columns: 1fr;
  }
  .frq-request-banner {
    flex-wrap: wrap;
  }
}
