/* ============================================================
   styles.css — Kōtare Network Engagement
   Common styles → ../../../Head-and-Foot/common.css
   Header styles → ../../../Head-and-Foot/header.css
   Footer styles → ../../../Head-and-Foot/footer.css
   ============================================================ */

/* ── KŌTARE SUB-HEADER ── */
.kotare-subheader {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; background: #ffffff; border-bottom: 2px solid #e0e0e0;
  max-width: 860px; margin: 0 auto; gap: 16px;
}
.kotare-subheader .logo-partner { height: 40px; width: auto; object-fit: contain; opacity: 0.9; }
.kotare-subheader .logo-kotare  { height: 48px; width: auto; object-fit: contain; }
@media (max-width: 600px) {
  .kotare-subheader { padding: 8px 12px; }
  .kotare-subheader .logo-partner { height: 30px; }
  .kotare-subheader .logo-kotare  { height: 36px; }
}

/* ── LANDING LAYOUT ── */
.landing-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.landing-text-col {
  flex: 1;
}
.landing-image-col {
  flex: 0 0 33%;
  max-width: 33%;
  display: flex;
  flex-direction: column;
}
.landing-image-col .cta-row {
  margin-top: 12px;
  display: flex;
}
.landing-image-col .cta-btn {
  width: 100%;
}
.landing-bird {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.landing-photo-credit {
  font-size: 10px;
  color: #999;
  margin-top: 6px;
  line-height: 1.4;
  text-align: right;
}
.landing-photo-credit a {
  color: #999;
  text-decoration: underline;
}
.landing-text-col .cta-row {
  display: none;
}
@media (max-width: 640px) {
  .landing-layout {
    flex-direction: column;
    gap: 20px;
  }
  .landing-image-col {
    flex: none;
    max-width: 100%;
  }
  .landing-text-col .cta-row {
    justify-content: center;
  }
}

/* ── LANDING LEAD ── */
.landing-lead {
  font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 400;
  line-height: 1.4; color: var(--colour-primary); margin-bottom: 28px;
}
.landing-lead strong { font-weight: 700; }
.landing-lead em { font-style: italic; }
@media (max-width: 768px) { .landing-lead { font-size: 22px; } }
@media (max-width: 480px) { .landing-lead { font-size: 19px; } }

/* ── IDENTITY SCREEN ── */
.identity-heading-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.identity-heading-row h1 { margin-bottom: 0; }
.field-inline-year { flex: 0 0 110px; margin-bottom: 0; }
.field-inline-year label { font-size: 13px; margin-bottom: 5px; }

.field-row { display: flex; gap: 8px; margin-bottom: 4px; }
.field-row .field { flex: 1; margin-bottom: 12px; }
.field-row .field.field-narrow { flex: 0 0 100px; }
@media (max-width: 480px) {
  .field-row { flex-direction: column; gap: 0; }
  .field-row .field.field-narrow { flex: 1; }
}

select {
  padding: 12px; border: 1px solid #ddd; border-radius: 4px;
  font-family: 'Inter', sans-serif; font-size: 16px; background: #ffffff;
  color: var(--colour-text-body); cursor: pointer; width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
select:focus { outline: none; border-color: var(--colour-primary); box-shadow: 0 0 0 2px rgba(44,74,110,0.1); }

/* ── MOTIVATION SCREEN ── */
.motivation-options { display: flex; flex-direction: column; gap: 16px; margin: 2rem 0; }
.motivation-btn {
  display: flex; align-items: flex-start; gap: 16px; background: #fff;
  border: 2px solid #e0e0e0; border-radius: 10px; padding: 20px;
  cursor: pointer; text-align: left; transition: all .2s;
}
.motivation-btn:hover { border-color: var(--colour-accent); }
.motivation-btn.sel   { border-color: var(--colour-primary); background: var(--colour-primary); }
.motivation-btn.sel .motivation-label { color: #fff; }
.motivation-btn.sel .motivation-key   { background: #fff; color: var(--colour-primary); }
.motivation-key {
  font-size: 18px; font-weight: 700; min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--colour-primary); color: #fff; border-radius: 6px; flex-shrink: 0;
}
.motivation-label { font-size: 16px; line-height: 1.5; color: var(--colour-text-body); padding-top: 4px; }

/* ── PERCEPTION SCREEN ── */
.perception-grid { display: flex; flex-direction: column; gap: 24px; margin: 1.5rem 0; }
.perception-row  { display: flex; flex-direction: column; gap: 8px; }
.perception-labels { display: flex; justify-content: space-between; font-size: 14px; color: #666; }
.perception-scale  { display: flex; gap: 8px; }
.perc-btn {
  flex: 1; padding: 10px 0; border: 2px solid #e0e0e0; border-radius: 6px;
  font-size: 15px; font-weight: 600; cursor: pointer; background: #fff;
  transition: all .15s; color: var(--colour-text-body);
}
.perc-btn:hover { border-color: var(--colour-accent); }
.perc-btn.sel   { background: var(--colour-primary); border-color: var(--colour-primary); color: #fff; }
@media (max-width: 600px) {
  .perception-scale { gap: 4px; }
  .perc-btn { font-size: 13px; padding: 8px 0; }
}

.section-divider { border: none; border-top: 1px solid #e0e0e0; margin: 2.5rem 0; }

/* ── RESULTS: SHIFT BARS ── */
.shift-row      { margin-bottom: 24px; }
.shift-dim      { background: #f9f9f9; border: 1px solid #e8e8e8; border-radius: 6px; padding: 14px 16px; }
.shift-anchors  { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--colour-primary); margin-bottom: 10px; }
.shift-track    { display: flex; flex-direction: column; gap: 6px; }
.shift-bar-wrap { display: flex; align-items: center; gap: 10px; }
.shift-phase-label { font-size: 11px; color: #999; font-family: 'IBM Plex Mono', monospace; width: 36px; flex-shrink: 0; }
.shift-track-inner { flex: 1; background: #e8e8e8; border-radius: 4px; height: 10px; overflow: hidden; }
.shift-bar       { height: 100%; border-radius: 4px; transition: width 400ms ease; }
.shift-bar.before { background: #aac4d8; }
.shift-bar.after  { background: var(--colour-accent); }
.shift-score    { font-size: 12px; font-weight: 700; color: #555; width: 16px; text-align: right; flex-shrink: 0; }
.shift-delta-row { margin-top: 8px; text-align: right; }
.shift-delta    { font-size: 13px; font-weight: 700; }
.shift-pos      { color: #2e7d32; }
.shift-neg      { color: #c62828; }
.shift-zero     { color: #999; }

/* ── EXTRAS SCREEN ── */
.extra-q      { margin-bottom: 2rem; }
.extra-q-text { font-size: 16px; color: var(--colour-text-body); margin-bottom: 12px; }
.extra-scale  { display: flex; gap: 8px; flex-wrap: wrap; }
.section-note { font-size: 14px; color: var(--colour-text-light); margin-bottom: 20px; margin-top: -10px; }
.secondary-btn { background: #fff !important; color: var(--colour-primary) !important; border: 2px solid var(--colour-primary) !important; }
.secondary-btn:hover { background: var(--colour-primary) !important; color: #fff !important; }

/* ── PRIVACY DRAWER ── */
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; }
.drawer-overlay.active { display: block; }
.privacy-drawer {
  position: fixed; top: 0; right: 0; width: 480px; max-width: 95vw;
  height: 100vh; background: #ffffff; box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  z-index: 201; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 320ms cubic-bezier(0.4,0,0.2,1);
}
.privacy-drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 2px solid var(--colour-accent);
  background: var(--colour-primary); flex-shrink: 0;
}
.drawer-header h2 { color: #ffffff; font-size: 20px; margin: 0; }
.drawer-close { background: none; border: none; color: #ffffff; font-size: 22px; cursor: pointer; padding: 4px 8px; opacity: 0.8; transition: opacity 200ms; }
.drawer-close:hover { opacity: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 28px; -webkit-overflow-scrolling: touch; }
.drawer-meta { font-size: 11px; color: var(--colour-text-light); font-family: 'IBM Plex Mono', monospace; margin-bottom: 24px; }
.drawer-body h3 { font-size: 15px; font-weight: 700; color: var(--colour-primary); margin: 24px 0 8px; }
.drawer-body h3:first-of-type { margin-top: 0; }
.drawer-body p { font-size: 14px; line-height: 1.7; color: var(--colour-text-body); margin-bottom: 12px; }
.drawer-body a { color: var(--colour-accent); text-decoration: underline; }
@media (max-width: 480px) { .privacy-drawer { width: 100vw; } }

.checkbox-row { margin-top: 10px; }
.body-copy.small { font-weight: 400; }
.field { margin-top: 12px; }
.subfield-wrap { margin-top: 6px; margin-bottom: 4px; padding-left: 30px; }
.subfield-input { width: 100%; font-size: 14px; padding: 8px 12px; border: 1px solid var(--ui-border, #ddd); border-radius: 6px; font-family: inherit; }


/* ── ADMIN DEMO CARD ── */
.admin-demo-card {
  margin-top: 32px;
  padding: 20px 24px;
  border: 2px solid #c9930a;
  border-radius: 10px;
  background: #fffbf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.admin-demo-label { font-size: 11px; color: #996600; margin: 0; letter-spacing: 0.05em; text-transform: uppercase; }
.admin-demo-btn {
  background: #c9930a;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 200ms;
}
.admin-demo-btn:hover { background: #a87a08; }

/* ── ADMIN MODAL ── */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.admin-modal-overlay.open { display: flex; }
.admin-modal {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  max-width: 560px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.admin-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  font-size: 20px; cursor: pointer; color: #aaa; line-height: 1;
}
.admin-modal-close:hover { color: #333; }
.admin-dash-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.admin-dash-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border: 1px solid #e0e0e0; border-radius: 8px; background: #f9f9f9;
}
.admin-dash-text { display: flex; flex-direction: column; gap: 3px; }
.admin-dash-text strong { font-size: 14px; color: #2C4A6E; }
.admin-dash-text span { font-size: 13px; color: #666; line-height: 1.4; }
.admin-dash-btn {
  background: #2C4A6E; color: #fff; border: none;
  padding: 8px 16px; border-radius: 6px;
  font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background 200ms; flex-shrink: 0;
}
.admin-dash-btn:hover { background: #00A8CC; }

.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.admin-dash-btn.secondary {
  background: #ffffff;
  color: #2C4A6E;
  border: 2px solid #2C4A6E;
}
.admin-dash-btn.secondary:hover { background: #f0f4f8; }

.admin-modal {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  width: 560px;
  max-width: 92vw;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.admin-modal-pager {
  font-size: 10px;
  color: #aaa;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.admin-modal-page {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
}

.admin-modal-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
#adminPage2 .admin-modal-footer button:nth-child(2) {
  text-align: center;
  justify-self: center;
  padding: 10px 28px;
}
