/* ====================================================
   Homeschool Planner - Shared Stylesheet
   styles.css - referenced by all pages
   ==================================================== */

/* ── THEMES ── */
:root, [data-theme="light"] {
  --accent:        #4A7CB5;
  --accent-hover:  #3A6CA5;
  --accent-dark:   #2A5C95;
  --accent-subtle: #EBF2FB;
  --bg:            #F5F6FA;
  --surface:       #FFFFFF;
  --border:        #D8DCE6;
  --text:          #1C2333;
  --text-muted:    #6B7280;
  --nav-bg:        rgba(255,255,255,0.95);
  --shadow:        rgba(74,124,181,0.10);
  --dl-text:       #ffffff;
  --dl-sub:        rgba(255,255,255,0.80);
  --dl-note:       rgba(255,255,255,0.60);
}

[data-theme="dark"] {
  --accent:        #7c3aed;
  --accent-hover:  #6d2ee0;
  --accent-dark:   #5a20c8;
  --accent-subtle: rgba(124,58,237,0.12);
  --bg:            #0d0b1a;
  --surface:       #1a1730;
  --border:        rgba(255,255,255,0.07);
  --text:          rgba(255,255,255,0.90);
  --text-muted:    rgba(214,210,255,0.50);
  --nav-bg:        rgba(13,11,26,0.85);
  --shadow:        rgba(124,58,237,0.15);
  --dl-text:       #ffffff;
  --dl-sub:        rgba(255,255,255,0.80);
  --dl-note:       rgba(255,255,255,0.60);
}

[data-theme="pride"] {
  --accent:        #c044f0;
  --accent-hover:  #a830d4;
  --accent-dark:   #8820b8;
  --accent-subtle: rgba(192,68,240,0.15);
  --bg:            #0d0b1a;
  --surface:       #161428;
  --border:        rgba(255,255,255,0.09);
  --text:          #f0eeff;
  --text-muted:    rgba(214,210,255,0.50);
  --nav-bg:        rgba(10,8,28,0.88);
  --shadow:        rgba(192,68,240,0.15);
  --dl-text:       #ffffff;
  --dl-sub:        rgba(255,255,255,0.80);
  --dl-note:       rgba(255,255,255,0.60);
}

/* ── PRIDE: rainbow buttons ── */
[data-theme="pride"] .btn-primary {
  background: linear-gradient(90deg, rgba(180,50,50,0.9), rgba(190,110,30,0.9), rgba(150,150,30,0.9), rgba(30,130,70,0.9), rgba(30,80,170,0.9), rgba(100,30,160,0.9));
  background-size: 200% 100%;
  transition: background-position 0.4s ease, box-shadow 0.2s;
  border: none;
}
[data-theme="pride"] .btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 4px 24px rgba(140,40,200,0.40);
  color: #fff;
  opacity: 1;
  transform: none;
}
[data-theme="pride"] .btn-outline {
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(90deg, rgba(180,50,50,0.7), rgba(190,110,30,0.7), rgba(150,150,30,0.7), rgba(30,130,70,0.7), rgba(30,80,170,0.7), rgba(100,30,160,0.7)) border-box;
  border: 1px solid transparent;
  color: var(--text);
}
[data-theme="pride"] .btn-outline:hover {
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(90deg, rgba(180,50,50,0.9), rgba(190,110,30,0.9), rgba(150,150,30,0.9), rgba(30,130,70,0.9), rgba(30,80,170,0.9), rgba(100,30,160,0.9)) border-box;
  border-color: transparent;
  color: var(--text);
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, color 0.2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── NAV ── */
nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 7px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(128,128,128,0.08); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s, transform 0.15s;
  text-decoration: none;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── THEME PICKER ── */
.theme-picker { position: relative; margin-left: 8px; }
.theme-picker-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.theme-picker-btn:hover { color: var(--text); border-color: var(--accent); }
.theme-picker-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 140px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 201;
}
.theme-picker.open .theme-picker-menu { display: block; }
.theme-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 7px;
  text-align: left;
  font-family: inherit;
  transition: all 0.2s;
}
.theme-option:hover { color: var(--text); background: rgba(128,128,128,0.08); }
.theme-option.active { color: var(--text); }
.theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(128,128,128,0.25);
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-right { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-right a { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.footer-right a:hover { color: var(--accent); }

/* ── LEGAL PAGES ── */
.legal-page-header {
  background: var(--accent);
  padding: 40px 24px 32px;
  text-align: center;
}
.legal-page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.legal-page-header p {
  margin-top: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}
.legal-content {
  max-width: 780px;
  margin: 48px auto;
  padding: 0 24px 80px;
  flex: 1;
}
.last-updated {
  display: inline-block;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 40px;
}
.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.legal-content p { margin-bottom: 16px; color: var(--text-muted); }
.legal-content ul { margin: 12px 0 16px 24px; color: var(--text-muted); }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--accent); text-decoration: underline; }
.highlight-green {
  background: rgba(46,139,87,0.1);
  border-left: 4px solid #2e8b57;
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  margin: 24px 0;
}
.highlight-green p { margin: 0; font-weight: 600; color: var(--text); }
.highlight-amber {
  background: rgba(245,158,11,0.1);
  border-left: 4px solid #f59e0b;
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  margin: 24px 0;
}
.highlight-amber p { margin: 0; color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .legal-content { margin: 24px auto; }
  .legal-page-header h1 { font-size: 1.5rem; }
}
