/* ==========================================================================
   bc-learn.css — Learn drawer: fish profiles + Reedy AI helper
   Vwhater.26
   Brand: navy #0a1526 / #0c1828 / #0f1d2d, yellow #f6c23b
   ========================================================================== */

/* Learn drawer uses the same .drawer chrome but with a different theme tint */
#drawerLearn .drawer-panel {
  background: #0a1526;
  color: #e6edf6;
}

/* Tab bar at top of Learn drawer */
.learn-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  border-bottom: 1px solid rgba(246, 194, 59, 0.15);
}
.learn-tab {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  color: #9bb0c7;
  border: 0;
  border-bottom: 2px solid transparent;
  font: 600 14px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.learn-tab:hover { color: #e6edf6; }
.learn-tab.active {
  color: #f6c23b;
  border-bottom-color: #f6c23b;
}

/* Tab body */
.learn-body { padding: 14px 16px; }
.learn-body[hidden] { display: none; }

/* ========== FISH PROFILES TAB ========== */
.learn-fish-search {
  margin-bottom: 12px;
}
.learn-fish-search input {
  width: 100%;
  padding: 10px 14px;
  background: #0f1d2d;
  border: 1px solid rgba(246, 194, 59, 0.2);
  border-radius: 8px;
  color: #e6edf6;
  font: 15px/1.3 system-ui, sans-serif;
}
.learn-fish-search input::placeholder { color: #6b7e96; }
.learn-fish-search input:focus {
  outline: 0;
  border-color: #f6c23b;
}

.learn-fish-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.learn-fish-list[hidden] { display: none; }

.learn-fish-card {
  background: #0c1828;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.learn-fish-card:hover {
  border-color: #f6c23b;
  transform: translateY(-1px);
}
.learn-fish-card .lf-ic {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
  display: block;
}
.learn-fish-card .lf-name {
  font: 600 14px/1.2 system-ui, sans-serif;
  color: #e6edf6;
  margin-bottom: 3px;
}
.learn-fish-card .lf-season {
  font: 500 11px/1.2 system-ui, sans-serif;
  color: #9bb0c7;
}

/* ================================================================
   FISH DETAIL READER (Vwhater.27) — big, readable, fullscreen
   Strategy: when a species is open, the Learn drawer panel expands
   to near-fullscreen on desktop/iPad, and is already full-height on
   mobile. Font-size scale S/M/L/XL chosen by Brett persists in LS.
   ================================================================ */

/* Text-size scales — applied to #drawerLearn by JS */
#drawerLearn.reader-S  { --read-base: 15px; --read-h1: 26px; --read-h2: 18px; --read-h3: 15px; }
#drawerLearn.reader-M  { --read-base: 17px; --read-h1: 30px; --read-h2: 21px; --read-h3: 17px; }
#drawerLearn.reader-L  { --read-base: 19px; --read-h1: 34px; --read-h2: 24px; --read-h3: 19px; }
#drawerLearn.reader-XL { --read-base: 22px; --read-h1: 40px; --read-h2: 28px; --read-h3: 22px; }

/* When a fish is open, make the drawer expand wide on desktop/iPad */
@media (min-width: 900px) {
  #drawerLearn .drawer-panel {
    transition: max-width .22s ease, width .22s ease;
  }
  #drawerLearn:has(.learn-fish-detail:not([hidden])) .drawer-panel {
    max-width: min(1100px, 96vw);
    width: min(1100px, 96vw);
  }
}

/* Detail container */
.learn-fish-detail { padding-bottom: 40px; }
.learn-fish-detail[hidden] { display: none; }

/* Toolbar: back + font-size controls */
.lfd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(246, 194, 59, 0.15);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.learn-fish-detail .lfd-back {
  background: #0c1828;
  border: 1px solid rgba(246, 194, 59, 0.25);
  color: #f6c23b;
  font: 700 14px/1 system-ui, sans-serif;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
.learn-fish-detail .lfd-back:hover { background: #0f1d2d; border-color: #f6c23b; }

.lfd-font-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #0c1828;
  padding: 4px 6px 4px 10px;
  border: 1px solid rgba(246, 194, 59, 0.15);
  border-radius: 10px;
}
.lfd-font-hint {
  font: 600 11px/1 system-ui, sans-serif;
  color: #9bb0c7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}
.lfd-font-btn {
  background: transparent;
  border: 0;
  color: #9bb0c7;
  font: 700 13px/1 system-ui, sans-serif;
  padding: 8px 10px;
  min-width: 32px;
  border-radius: 6px;
  cursor: pointer;
}
.lfd-font-btn:hover { color: #e6edf6; }
.lfd-font-btn.active {
  background: #f6c23b;
  color: #0a1526;
}

/* Hero: photo + title */
.lfd-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.lfd-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  background: #0c1828;
  display: block;
}
.lfd-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 96px;
}
.lfd-hero-text {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lfd-hero-icon {
  font-size: 44px;
  line-height: 1;
  flex-shrink: 0;
}
.lfd-title {
  font: 800 var(--read-h1, 30px)/1.1 system-ui, -apple-system, sans-serif;
  color: #f6c23b;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.lfd-season-big {
  font: 600 var(--read-h3, 17px)/1.3 system-ui, sans-serif;
  color: #e6edf6;
  background: rgba(246, 194, 59, 0.12);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
}

/* Desktop hero layout — photo left, text right */
@media (min-width: 700px) {
  .lfd-hero {
    grid-template-columns: 340px 1fr;
    align-items: center;
  }
  .lfd-photo { aspect-ratio: 4 / 3; }
  .lfd-hero-text { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Overview (Wikipedia intro) */
.lfd-overview {
  background: #0c1828;
  border: 1px solid rgba(246, 194, 59, 0.12);
  border-left: 3px solid #f6c23b;
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.lfd-overview-label {
  font: 800 11px/1 system-ui, sans-serif;
  color: #f6c23b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.lfd-overview p {
  font: 400 var(--read-base, 17px)/1.6 Georgia, 'Times New Roman', serif;
  color: #e6edf6;
  margin: 0 0 12px;
}
.lfd-overview p:last-child { margin-bottom: 0; }

/* H2 headings for Victoria / More sections */
.lfd-h2 {
  font: 800 var(--read-h2, 21px)/1.2 system-ui, sans-serif;
  color: #f6c23b;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(246, 194, 59, 0.2);
}
.lfd-h2-ic { font-size: 1.2em; }

/* Victoria quick-facts grid */
.lfd-vic { margin-bottom: 30px; }
.lfd-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.lfd-fact {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #0c1828;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
}
.lfd-fact-ic { font-size: 20px; line-height: 1; flex-shrink: 0; }
.lfd-fact-label {
  font: 700 11px/1 system-ui, sans-serif;
  color: #9bb0c7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.lfd-fact-value {
  font: 600 var(--read-h3, 17px)/1.3 system-ui, sans-serif;
  color: #e6edf6;
}

/* Victoria long-form sections */
.lfd-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 900px) {
  .lfd-sections { grid-template-columns: 1fr 1fr; }
  .lfd-section.tip { grid-column: 1 / -1; }
}
.lfd-section {
  background: #0c1828;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
}
.lfd-section.tip {
  background: rgba(246, 194, 59, 0.08);
  border-color: rgba(246, 194, 59, 0.3);
}
.lfd-section h3 {
  font: 700 var(--read-h3, 17px)/1.2 system-ui, sans-serif;
  color: #f6c23b;
  margin: 0 0 8px;
}
.lfd-section p {
  font: 400 var(--read-base, 17px)/1.55 system-ui, sans-serif;
  color: #e6edf6;
  margin: 0;
}

/* More from Wikipedia — collapsible sections */
.lfd-more { margin-top: 30px; }
.lfd-wiki-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lfd-wiki {
  background: #0c1828;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  overflow: hidden;
}
.lfd-wiki summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 var(--read-h3, 17px)/1.2 system-ui, sans-serif;
  color: #e6edf6;
  user-select: none;
  min-height: 52px;
}
.lfd-wiki summary::-webkit-details-marker { display: none; }
.lfd-wiki summary:hover { background: #0f1d2d; }
.lfd-wiki-ic { font-size: 1.2em; flex-shrink: 0; }
.lfd-wiki-chev {
  margin-left: auto;
  color: #f6c23b;
  transition: transform .2s;
  font-size: 1.2em;
}
.lfd-wiki[open] .lfd-wiki-chev { transform: rotate(180deg); }
.lfd-wiki-body {
  padding: 4px 18px 18px;
  border-top: 1px solid rgba(246, 194, 59, 0.1);
}
.lfd-wiki-body p {
  font: 400 var(--read-base, 17px)/1.65 Georgia, 'Times New Roman', serif;
  color: #e6edf6;
  margin: 12px 0;
}
.lfd-wiki-body p:first-child { margin-top: 8px; }
.lfd-wiki-body p:last-child { margin-bottom: 0; }

.lfd-wiki-link {
  display: inline-block;
  margin-top: 14px;
  font: 600 var(--read-base, 17px)/1.3 system-ui, sans-serif;
  color: #f6c23b;
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid rgba(246, 194, 59, 0.3);
  border-radius: 8px;
}
.lfd-wiki-link:hover { background: #0c1828; text-decoration: underline; }

.lfd-footer-nav {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
  margin-top: 20px;
  border-top: 1px solid rgba(246, 194, 59, 0.1);
}

/* ========== AI BOT TAB ========== */
.learn-bot-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 400px;
}

.learn-bot-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #0c1828;
  border: 1px solid rgba(246, 194, 59, 0.2);
  border-radius: 10px;
  margin-bottom: 12px;
}
.learn-bot-toggle .lbt-ic {
  font-size: 24px;
  line-height: 1;
}
.learn-bot-toggle .lbt-label {
  flex: 1;
  font: 600 15px/1.3 system-ui, sans-serif;
  color: #e6edf6;
}
.learn-bot-toggle .lbt-sub {
  font: 500 12px/1.3 system-ui, sans-serif;
  color: #9bb0c7;
  margin-top: 2px;
}

/* Switch */
.lbt-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.lbt-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.lbt-switch .lbt-slider {
  position: absolute;
  inset: 0;
  background: #1a2b42;
  border-radius: 28px;
  cursor: pointer;
  transition: background .2s;
}
.lbt-switch .lbt-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #9bb0c7;
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.lbt-switch input:checked + .lbt-slider {
  background: #f6c23b;
}
.lbt-switch input:checked + .lbt-slider::before {
  transform: translateX(20px);
  background: #0a1526;
}

/* Chat area */
.learn-bot-chat {
  flex: 1;
  overflow-y: auto;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.learn-bot-chat[hidden] { display: none; }

.lbc-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font: 400 14px/1.45 system-ui, sans-serif;
  word-wrap: break-word;
}
.lbc-msg.bot {
  background: #0c1828;
  color: #e6edf6;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.lbc-msg.user {
  background: #f6c23b;
  color: #0a1526;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.lbc-msg.typing {
  font-style: italic;
  color: #9bb0c7;
}

.lbc-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}
.lbc-suggestions button {
  background: #0c1828;
  color: #e6edf6;
  border: 1px solid rgba(246, 194, 59, 0.25);
  border-radius: 14px;
  padding: 7px 12px;
  font: 500 13px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.lbc-suggestions button:hover {
  background: #0f1d2d;
  border-color: #f6c23b;
}

/* Input */
.learn-bot-input {
  display: flex;
  gap: 8px;
  padding: 10px 2px 0;
  border-top: 1px solid rgba(246, 194, 59, 0.15);
  margin-top: 10px;
}
.learn-bot-input[hidden] { display: none; }
.learn-bot-input input {
  flex: 1;
  padding: 11px 14px;
  background: #0f1d2d;
  border: 1px solid rgba(246, 194, 59, 0.2);
  border-radius: 8px;
  color: #e6edf6;
  font: 15px/1.3 system-ui, sans-serif;
}
.learn-bot-input input:focus {
  outline: 0;
  border-color: #f6c23b;
}
.learn-bot-input button {
  padding: 0 18px;
  background: #f6c23b;
  color: #0a1526;
  border: 0;
  border-radius: 8px;
  font: 700 14px/1 system-ui, sans-serif;
  cursor: pointer;
}
.learn-bot-input button:hover { background: #e5b229; }
.learn-bot-input button:disabled { opacity: 0.5; cursor: not-allowed; }

.learn-bot-off {
  text-align: center;
  color: #9bb0c7;
  padding: 40px 20px;
  font: 500 14px/1.4 system-ui, sans-serif;
}

/* Mobile (≤767) */
@media (max-width: 767px) {
  .learn-fish-list { grid-template-columns: repeat(2, 1fr); }
  .learn-bot-wrap { height: calc(100vh - 200px); }
  .lfd-toolbar { padding-bottom: 12px; margin-bottom: 14px; }
  .lfd-hero { gap: 12px; margin-bottom: 18px; }
  .lfd-facts { grid-template-columns: 1fr 1fr; }
  /* On mobile the drawer panel is already full-width via existing .drawer rules */
}
