﻿/* Compact Resource Category layout (approved Class 10 Science family). */

/*
 * Flex/grid overflow hardening.
 * - Never set max-width on Bootstrap .row (breaks mobile gutter compensation â†’ 16/40).
 * - Never set max-width:100% on .container (overrides shared desktop centering â†’ full-bleed).
 */
.rbl-rc-pilot {
  min-width: 0;
}

.rbl-rc-pilot .row,
.rbl-rc-pilot [class*="col-"] {
  min-width: 0;
}

.rbl-rc-pilot .rbl-stype-v2-tabs-wrap {
  max-width: 100%;
  min-width: 0;
}

/* Collections nav styles: assessment-collections-nav.css (loaded by RC + Subject Hub). */

.rbl-rc-pilot .rbl-stype-v2-search,
.rbl-rc-pilot .rbl-stype-v2-search-form {
  max-width: 100%;
  min-width: 0;
}

.rbl-rc-pilot .rbl-stype-v2-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rbl-rc-pilot .rbl-stype-v2-tabs::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1200px) {
  .rbl-rc-pilot .rbl-stype-v2-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }
}

.rbl-rc-pilot .rbl-stype-v2-tab {
  flex: 0 0 auto;
}

.rbl-rc-pilot-tab-count {
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  opacity: .85;
}

.rbl-rc-pilot .rbl-stype-v2-tab.is-active .rbl-rc-pilot-tab-count {
  opacity: 1;
}

.rbl-rc-pilot .rbl-stype-v2-search-input:focus {
  outline: 2px solid rgba(247, 108, 27, .35);
  outline-offset: 1px;
  border-color: #fdba74;
}

/* Intro: float art into existing whitespace (no extra hero row). */
.rbl-rc-pilot-intro {
  display: flow-root;
}

.rbl-rc-pilot-art {
  float: right;
  width: 108px;
  max-width: 34%;
  margin: 0 0 6px 8px;
}

.rbl-rc-pilot-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 666;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 600px) {
  .rbl-rc-pilot .rbl-stype-v2-title {
    font-size: 21px;
    line-height: 1.16;
    letter-spacing: -.02em;
  }

  .rbl-rc-pilot .rbl-stype-v2-lead {
    font-size: 15px;
    line-height: 1.5;
    max-width: none;
    color: var(--rbl-muted-readable, #4b5563);
  }
}

@media (max-width: 340px) {
  .rbl-rc-pilot-art {
    width: 72px;
    max-width: 29%;
    margin: 0 0 4px 6px;
  }

  .rbl-rc-pilot .rbl-stype-v2-title {
    font-size: 19px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .rbl-rc-pilot-intro {
    position: relative;
    display: block;
  }

  .rbl-rc-pilot-art {
    float: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 84px;
    max-width: none;
    margin: 0;
  }

  .rbl-rc-pilot .rbl-stype-v2-lead {
    max-width: calc(100% - 96px);
  }
}

@media (min-width: 1200px) {
  .rbl-rc-pilot-intro {
    position: relative;
    display: block;
    min-height: 136px;
  }

  .rbl-rc-pilot-art {
    float: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 156px;
    max-width: 175px;
    margin: 0;
  }

  .rbl-rc-pilot-art img {
    max-height: 144px;
  }

  .rbl-rc-pilot .rbl-stype-v2-lead {
    max-width: 640px;
  }
}

/* Chapter cards */
.rbl-rc-pilot-chapter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.rbl-rc-pilot-chapter-head .rbl-stype-v2-section-title {
  margin: 0;
}

.rbl-rc-pilot-chapter-jump,
.rbl-rc-pilot-chapters-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: #c2410c;
  font-size: .8rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}

.rbl-rc-pilot-chapter-jump:focus-visible,
.rbl-rc-pilot-chapters-more:focus-visible {
  outline: 2px solid rgba(247, 108, 27, .45);
  outline-offset: 2px;
  border-radius: 4px;
}

.rbl-rc-pilot-chapters-more {
  display: none;
  width: 100%;
  margin-top: 12px;
  text-align: center;
}

.rbl-rc-pilot .rbl-stype-v2-chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .rbl-rc-pilot .rbl-stype-v2-chapter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .rbl-rc-pilot .rbl-stype-v2-chapter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rbl-rc-pilot .rbl-stype-v2-chapter-card {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 8px 10px;
  justify-content: flex-start;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.rbl-rc-pilot-chapter-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  background: transparent;
}

.rbl-rc-pilot-chapter-txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rbl-rc-pilot .rbl-stype-v2-chapter-name {
  /* Prefer natural word wraps; avoid mid-syllable breaks from "anywhere". */
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
  font-size: .8rem;
  line-height: 1.28;
}

.rbl-rc-pilot .rbl-stype-v2-chapter-count {
  font-size: .72rem;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .rbl-rc-pilot .rbl-stype-v2-chapter-count {
    font-size: var(--rbl-fs-meta, 13px);
    white-space: nowrap;
  }

  .rbl-rc-pilot-tab-count {
    font-size: var(--rbl-fs-meta, 13px);
  }
}

/* Progressive disclosure: only when JS marked the pilot ready. */
@media (max-width: 991.98px) {
  .rbl-rc-pilot--js .rbl-rc-pilot-chapter-jump {
    display: inline;
  }

  .rbl-rc-pilot--js .rbl-rc-pilot-chapters-more {
    display: block;
  }

  .rbl-rc-pilot--js:not(.rbl-rc-pilot--chapters-expanded) .rbl-rc-pilot-chapter-extra {
    display: none;
  }
}

@media (min-width: 992px) {
  .rbl-rc-pilot-chapter-jump,
  .rbl-rc-pilot-chapters-more {
    display: none !important;
  }

  .rbl-rc-pilot-chapter-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
}

/* Resource rows */
.rbl-rc-pilot .rbl-resource-row {
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
}

.rbl-rc-pilot-doc-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  display: block;
}

.rbl-rc-pilot .rbl-resource-row__title {
  font-weight: 700;
  font-size: .95rem;
}

.rbl-rc-pilot .rbl-resource-row__meta-item--answers {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}

.rbl-rc-pilot-view {
  flex-shrink: 0;
  align-self: center;
  font-size: 13px;
  font-weight: 700;
  color: #c2410c;
  white-space: nowrap;
  border: 1px solid #fdba74;
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
}

.rbl-rc-pilot .rbl-resource-row:hover .rbl-rc-pilot-view,
.rbl-rc-pilot .rbl-resource-row:focus-visible .rbl-rc-pilot-view {
  background: #fff7ed;
  border-color: #f76c1b;
}

@media (max-width: 359.98px) {
  /* Keep 2-column grid; reclaim a few px for titles without shrinking type hard. */
  .rbl-rc-pilot .rbl-stype-v2-chapter-grid {
    gap: 6px;
  }

  .rbl-rc-pilot .rbl-stype-v2-chapter-card {
    gap: 6px;
    padding: 8px 7px;
    min-height: 60px;
    align-items: flex-start;
  }

  .rbl-rc-pilot-chapter-icon {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    margin-top: 1px;
  }

  .rbl-rc-pilot .rbl-stype-v2-chapter-name {
    font-size: .76rem;
    line-height: 1.3;
  }

  .rbl-rc-pilot .rbl-stype-v2-chapter-count {
    font-size: 12px;
    white-space: nowrap;
  }

  .rbl-rc-pilot-view {
    font-size: 0;
    padding: 5px 8px;
  }

  .rbl-rc-pilot-view::after {
    content: "View";
    font-size: 12px;
    font-weight: 700;
  }

  .rbl-rc-pilot .rbl-stype-v2-search-btn {
    padding: 8px 10px;
  }
}

/* CI debug toolbar icon sits on Account in local CI_DEBUG; keep it clear of bottom nav. */
@media (max-width: 991.98px) {
  #debug-icon.debug-bar-dinlineBlock {
    bottom: calc(var(--rbl-bottom-nav-h, 80px) + 8px + var(--rbl-safe-bottom, 0px)) !important;
    right: 8px !important;
  }
}
