/* train.css — shared styles for the in-house training platform */

:root {
  --navy:        #0A1628;
  --navy-mid:    #0F2040;
  --navy-light:  #162A52;
  --white:       #F5F0E8;
  --white-dim:   rgba(245,240,232,0.55);
  --white-faint: rgba(245,240,232,0.08);
  --gold:        #C9A84C;
  --gold-light:  #E8C97A;
  --gold-glow:   rgba(201,168,76,0.12);
  --teal:        #0E7C86;
  --teal-glow:   rgba(14,124,134,0.15);
  --purple:      #8B5CF6;
  --purple-glow: rgba(139,92,246,0.12);
  --green:       #1DB87A;
  --red:         #E05050;
  --border:      rgba(201,168,76,0.15);
  --border-dim:  rgba(245,240,232,0.06);
  --glass:       rgba(245,240,232,0.03);
}

/* Tier accent overrides */
[data-tier="staff"]    { --accent: var(--teal);   --accent-glow: var(--teal-glow); }
[data-tier="approver"] { --accent: var(--gold);   --accent-glow: var(--gold-glow); }
[data-tier="admin"]    { --accent: var(--purple); --accent-glow: var(--purple-glow); }

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--navy);
  color: var(--white);
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, .serif { font-family: 'Cormorant Garamond', serif; }
code, .mono { font-family: 'DM Mono', monospace; }

/* Prelude page */
.prelude {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vh 8vw;
  max-width: 900px;
  margin: 0 auto;
}
.prelude p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: rgba(245,240,232,0.85);
}
.prelude .cta {
  margin-top: 40px;
  align-self: flex-start;
}

/* Auth gate */
.auth-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.auth-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
}
.auth-card input {
  width: 100%;
  padding: 12px 16px;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--white);
  font-size: 16px;
  margin-bottom: 16px;
}
.auth-card button {
  width: 100%;
  padding: 14px;
  background: var(--accent, var(--gold));
  color: var(--navy);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

/* Tier badge */
.tier-badge {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 6px 12px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 50;
}

/* Sections */
.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-dim);
}
.section-number {
  font-family: 'DM Mono', monospace;
  color: var(--accent, var(--gold));
  font-size: 13px;
  letter-spacing: 1px;
}
.section-title {
  font-size: 28px;
  margin: 8px 0 24px;
  color: var(--white);
}
.section-title .indo {
  display: block;
  font-size: 16px;
  color: var(--white-dim);
  font-style: italic;
  margin-top: 4px;
}

/* Checkboxes + progress */
.step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
}
.step input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: var(--accent, var(--gold));
  flex-shrink: 0; margin-top: 2px;
}
.progress-bar {
  height: 4px;
  background: var(--white-faint);
  border-radius: 2px;
  overflow: hidden;
  margin: 16px 0;
}
.progress-bar .fill {
  height: 100%;
  background: var(--accent, var(--gold));
  width: 0;
  transition: width 0.3s ease;
}
.overall-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100;
}

/* Scenario button */
.scenario-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  margin: 16px 0;
  cursor: pointer;
}
.scenario-btn::before { content: "▶ "; }

/* Quiz */
.quiz { margin: 32px 0; padding: 24px; background: var(--glass); border: 1px solid var(--border-dim); border-radius: 8px; }
.quiz .q { font-weight: 600; margin-bottom: 16px; }
.quiz .opt { display: block; padding: 12px; margin-bottom: 8px; background: var(--navy-mid); border: 1px solid var(--border-dim); border-radius: 6px; cursor: pointer; }
.quiz .opt.correct { border-color: var(--green); }
.quiz .opt.wrong { border-color: var(--red); }

/* Mobile */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .prelude { padding: 6vh 6vw; }
  .prelude p { font-size: 16px; }
  .section-title { font-size: 22px; }
  .auth-card { padding: 24px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Interactive prototype components (Section 03 onward)
   ═══════════════════════════════════════════════════════════════════════ */

.ss-frame {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy-mid);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.ss-chrome {
  padding: 8px 14px;
  background: var(--navy-light);
  color: var(--white-dim);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-dim);
}
.ss-frame figcaption {
  padding: 10px 14px;
  color: var(--white-dim);
  font-style: italic;
  font-size: 12px;
  border-top: 1px solid var(--border-dim);
  background: rgba(0,0,0,0.15);
}

.hotspot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--gold-light);
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--gold-glow);
  animation: hotspot-pulse 2s ease-out infinite;
  z-index: 10;
}
.hotspot:hover { transform: scale(1.1); }
@keyframes hotspot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201,168,76,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(201,168,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}
.hotspot-tip {
  display: none;
  margin: 12px 0 20px;
  padding: 14px 18px;
  background: var(--gold-glow);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 14px;
}
.hotspot-tip strong { color: var(--gold); display: block; margin-bottom: 4px; }
.hotspot-tip-open { display: block; }

.scenario-card {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--glass);
  border-left: 3px solid var(--accent, var(--gold));
  border-radius: 6px;
}
.scenario-q {
  font-size: 15px;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.5;
}
.scenario-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.scenario-opt {
  padding: 9px 16px;
  background: var(--navy-mid);
  border: 1px solid var(--border-dim);
  color: var(--white);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.scenario-opt:hover { background: var(--navy-light); border-color: var(--accent, var(--gold)); }
.scenario-opt.correct { background: rgba(29,184,122,0.2); border-color: var(--green); color: var(--green); }
.scenario-opt.wrong { background: rgba(224,80,80,0.2); border-color: var(--red); color: var(--red); }
.scenario-card.answered .scenario-opt:not(.correct):not(.wrong) { opacity: 0.5; pointer-events: none; }
.scenario-feedback {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--navy-mid);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.status-pill {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  position: relative;
}
.status-pill::after {
  content: attr(data-desc);
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: 280px;
  padding: 10px 14px;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--white);
  z-index: 20;
  white-space: normal;
  line-height: 1.4;
}
.status-pill.expanded::after { display: block; }
.status-pill.under-review    { background: var(--teal-glow); color: var(--teal); border-color: var(--teal); }
.status-pill.info-needed     { background: rgba(224,123,0,0.15); color: #E07B00; border-color: #E07B00; }
.status-pill.awaiting-justin { background: var(--purple-glow); color: var(--purple); border-color: var(--purple); }
.status-pill.approved        { background: rgba(29,184,122,0.15); color: var(--green); border-color: var(--green); }
.status-pill.payment-sent    { background: rgba(96,165,250,0.15); color: #60A5FA; border-color: #60A5FA; }
.status-pill.rejected        { background: rgba(224,80,80,0.15); color: var(--red); border-color: var(--red); }
.status-pill.payroll         { background: var(--gold-glow); color: var(--gold); border-color: var(--gold); }

.before-after {
  margin: 20px 0;
}
.ba-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-dim);
}
.ba-tab {
  padding: 10px 18px;
  background: transparent;
  color: var(--white-dim);
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ba-tab:hover { color: var(--white); }
.ba-tab.active { color: var(--accent, var(--gold)); border-bottom-color: var(--accent, var(--gold)); }
.ba-panel { animation: fade-in 0.25s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .hotspot { width: 24px; height: 24px; font-size: 11px; }
  .scenario-opts { flex-direction: column; }
  .scenario-opt { width: 100%; text-align: left; }
  .status-pill::after { left: 50%; transform: translateX(-50%); }
  .ba-tab { flex: 1; padding: 10px 8px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Language toggle — EN / ID
   ═══════════════════════════════════════════════════════════════════════ */
.lang-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  z-index: 50;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--white-dim);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}
.lang-toggle button.active {
  background: var(--accent, var(--gold));
  color: var(--navy);
  font-weight: 600;
}
.lang-toggle button:hover:not(.active) {
  color: var(--white);
}

/* Default to English — hide ID content */
body [data-lang="id"] { display: none; }
body.lang-id [data-lang="id"] { display: revert; }
body.lang-id [data-lang="en"] { display: none; }

/* For inline elements that should become inline when shown */
body.lang-id span[data-lang="id"],
body.lang-id em[data-lang="id"],
body.lang-id strong[data-lang="id"],
body.lang-id code[data-lang="id"] { display: inline; }

@media (max-width: 768px) {
  .lang-toggle { top: 12px; left: 12px; font-size: 10px; }
  .lang-toggle button { padding: 4px 10px; }
}
