/* =========================================================
   Spokane Soaring – Glider Study Guide
   study-guide.css  v1.0.0
   ========================================================= */

/* ── Container ─────────────────────────────────────────── */
.sgs-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a1a;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 2rem;
}

/* ── Header ─────────────────────────────────────────────── */
.sgs-header {
  background: #0d2b4a;
  border-radius: 12px 12px 0 0;
  padding: 1.25rem 1.5rem 1rem;
  margin-bottom: 0;
}

.sgs-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1rem;
}

.sgs-glider-icon {
  font-size: 28px;
  color: #5bbfff;
  line-height: 1;
  flex-shrink: 0;
}

.sgs-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
  border: none !important;
  line-height: 1.2 !important;
}

.sgs-subtitle {
  font-size: 12px;
  color: #8ab8d9;
  margin: 0;
}

/* ── Top Bar ────────────────────────────────────────────── */
.sgs-top-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.sgs-search-wrap {
  flex: 1;
  min-width: 160px;
  position: relative;
}

.sgs-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #8ab8d9;
  font-size: 14px;
  pointer-events: none;
}

.sgs-search {
  width: 100%;
  padding: 7px 10px 7px 30px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.sgs-search::placeholder { color: #8ab8d9; }
.sgs-search:focus { border-color: rgba(91,191,255,0.5); background: rgba(255,255,255,0.15); }

.sgs-mode-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.sgs-mode-btn {
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: transparent;
  color: #8ab8d9;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.sgs-mode-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sgs-mode-btn.sgs-active { background: rgba(91,191,255,0.2); border-color: rgba(91,191,255,0.5); color: #ffffff; }

/* ── Progress ───────────────────────────────────────────── */
.sgs-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f5f7fa;
  padding: .75rem 1.5rem;
  border-left: 1px solid #e0e6ee;
  border-right: 1px solid #e0e6ee;
}

.sgs-prog-bg {
  flex: 1;
  height: 6px;
  background: #d8e4ef;
  border-radius: 3px;
  overflow: hidden;
}

.sgs-prog-fill {
  height: 6px;
  border-radius: 3px;
  background: #1D9E75;
  transition: width 0.4s ease;
}

.sgs-stats {
  font-size: 12px;
  color: #5a6a7a;
  white-space: nowrap;
  display: flex;
  gap: 14px;
}

.sgs-stats strong { color: #1a1a1a; }

/* ── Filters ────────────────────────────────────────────── */
.sgs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: .75rem 1.5rem;
  background: #f5f7fa;
  border: 1px solid #e0e6ee;
  border-top: none;
}

.sgs-fb {
  font-size: 11px;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid #d0d8e0;
  background: #ffffff;
  color: #5a6a7a;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-weight: 400;
}

.sgs-fb:hover { border-color: #aab8c5; }

.sgs-f-all.sgs-fb-on    { background: #0d2b4a; border-color: #0d2b4a; color: #fff; font-weight: 500; }
.sgs-f-certs.sgs-fb-on  { background: #EAF3DE; border-color: #3B6D11; color: #3B6D11; font-weight: 500; }
.sgs-f-wx.sgs-fb-on     { background: #E6F1FB; border-color: #185FA5; color: #185FA5; font-weight: 500; }
.sgs-f-sys.sgs-fb-on    { background: #EEEDFE; border-color: #534AB7; color: #534AB7; font-weight: 500; }
.sgs-f-perf.sgs-fb-on   { background: #FAEEDA; border-color: #854F0B; color: #854F0B; font-weight: 500; }
.sgs-f-med.sgs-fb-on    { background: #FAECE7; border-color: #993C1D; color: #993C1D; font-weight: 500; }
.sgs-f-pre.sgs-fb-on    { background: #E1F5EE; border-color: #0F6E56; color: #0F6E56; font-weight: 500; }
.sgs-f-ops.sgs-fb-on    { background: #FCEBEB; border-color: #A32D2D; color: #A32D2D; font-weight: 500; }
.sgs-f-launch.sgs-fb-on { background: #FFF3E0; border-color: #BA7517; color: #854F0B; font-weight: 500; }
.sgs-f-soar.sgs-fb-on   { background: #E1F5EE; border-color: #1D9E75; color: #0F6E56; font-weight: 500; }
.sgs-f-nav.sgs-fb-on    { background: #E6F1FB; border-color: #378ADD; color: #185FA5; font-weight: 500; }
.sgs-f-emg.sgs-fb-on    { background: #FCEBEB; border-color: #E24B4A; color: #A32D2D; font-weight: 500; }
.sgs-f-flag.sgs-fb-on   { background: #FFF3E0; border-color: #EF9F27; color: #BA7517; font-weight: 500; }

/* ── Card ───────────────────────────────────────────────── */
.sgs-card {
  background: #ffffff;
  border: 1px solid #e0e6ee;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 .5rem;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sgs-card.sgs-flagged {
  border-left: 4px solid #EF9F27;
}

.sgs-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: .875rem;
}

.sgs-card-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.sgs-badge {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
  background: #eef2f7;
  color: #3a4a5a;
}

.sgs-b-certs  { background: #EAF3DE; color: #3B6D11; }
.sgs-b-wx     { background: #E6F1FB; color: #185FA5; }
.sgs-b-sys    { background: #EEEDFE; color: #534AB7; }
.sgs-b-perf   { background: #FAEEDA; color: #854F0B; }
.sgs-b-med    { background: #FAECE7; color: #993C1D; }
.sgs-b-pre    { background: #E1F5EE; color: #0F6E56; }
.sgs-b-ops    { background: #FCEBEB; color: #A32D2D; }
.sgs-b-launch { background: #FFF3E0; color: #854F0B; }
.sgs-b-soar   { background: #E1F5EE; color: #0F6E56; }
.sgs-b-nav    { background: #E6F1FB; color: #185FA5; }
.sgs-b-emg    { background: #FCEBEB; color: #A32D2D; }

.sgs-flag-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #FFF3E0;
  color: #854F0B;
  border: 1px solid #FAC775;
  font-weight: 500;
  flex-shrink: 0;
}

.sgs-qnum {
  font-size: 11px;
  color: #9aabba;
  white-space: nowrap;
  flex-shrink: 0;
}

.sgs-question {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: #1a1a1a;
  margin-bottom: .75rem;
}

/* ── Answer Box ─────────────────────────────────────────── */
.sgs-ans-box {
  background: #f5f9f7;
  border-left: 3px solid #1D9E75;
  border-radius: 0 8px 8px 0;
  padding: .875rem 1rem;
  margin-top: .5rem;
}

.sgs-ans-lbl {
  font-size: 10px;
  font-weight: 600;
  color: #0F6E56;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.sgs-ans-lbl.sgs-flag-lbl {
  color: #854F0B;
}

.sgs-flag-lbl ~ .sgs-ans-text {
  border-left-color: #EF9F27;
}

.sgs-ans-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: #2a2a2a;
}

.sgs-ref {
  font-size: 11px;
  color: #8a9aaa;
  margin-top: 6px;
  font-style: italic;
}

/* ── Buttons ────────────────────────────────────────────── */
.sgs-card-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.sgs-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid #d0d8e0;
  background: #ffffff;
  color: #5a6a7a;
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
  font-family: inherit;
}

.sgs-btn:hover { background: #f5f7fa; border-color: #aab8c5; }

.sgs-btn-show {
  background: #E1F5EE;
  border-color: #1D9E75;
  color: #0F6E56;
  font-weight: 600;
}

.sgs-btn-show:hover { background: #c0ead8; }

.sgs-btn-known { border-color: #1D9E75; color: #0F6E56; }
.sgs-btn-known.sgs-marked { background: #E1F5EE; }
.sgs-btn-review { border-color: #BA7517; color: #854F0B; }
.sgs-btn-review.sgs-marked { background: #FFF3E0; }

/* ── Navigation ─────────────────────────────────────────── */
.sgs-nav-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.sgs-nav-btn {
  padding: 9px 20px;
  border-radius: 8px;
  border: 1px solid #d0d8e0;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all .15s;
}

.sgs-nav-btn:hover { background: #f5f7fa; border-color: #aab8c5; }
.sgs-nav-btn.sgs-nav-primary { background: #0d2b4a; border-color: #0d2b4a; color: #ffffff; }
.sgs-nav-btn.sgs-nav-primary:hover { background: #1a4070; }
.sgs-shuffle-btn { margin-left: auto; font-size: 13px; padding: 7px 14px; color: #5a6a7a; }

/* ── List View ──────────────────────────────────────────── */
.sgs-list { padding-top: .75rem; }

.sgs-list-item {
  background: #ffffff;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  padding: .875rem 1rem;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sgs-list-item:hover { background: #f5f7fa; border-color: #c0cdd8; }
.sgs-list-item.sgs-flagged { border-left: 3px solid #EF9F27; }
.sgs-list-item.sgs-known   { border-left: 3px solid #1D9E75; }
.sgs-list-item.sgs-in-review { border-left: 3px solid #BA7517; }

.sgs-list-q {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.45;
  font-weight: 500;
}

.sgs-list-meta {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
  align-items: center;
}

.sgs-ref-small {
  font-size: 11px;
  color: #9aabba;
  font-style: italic;
}

.sgs-status-known  { font-size: 11px; color: #1D9E75; font-weight: 500; }
.sgs-status-review { font-size: 11px; color: #BA7517; font-weight: 500; }

/* ── Empty state ────────────────────────────────────────── */
.sgs-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #7a8a9a;
  font-size: 15px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .sgs-header { padding: 1rem; border-radius: 8px 8px 0 0; }
  .sgs-progress-row { padding: .65rem 1rem; }
  .sgs-filters { padding: .65rem 1rem; }
  .sgs-card { padding: 1rem; margin: .75rem 0 .5rem; }
  .sgs-question { font-size: 15px; }
  .sgs-title { font-size: 17px !important; }
  .sgs-nav-btn { padding: 8px 14px; font-size: 13px; }
  .sgs-shuffle-btn { margin-left: 0; }
}
