/* =========================================
   RSU #87 Email Security Training - Styles
   ========================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary:   #1a3a5c;
  --accent:    #e8a020;
  --success:   #2d8a4e;
  --danger:    #c0392b;
  --light:     #f4f6f9;
  --text:      #222;
  --muted:     #666;
  --border:    #d0d7e2;
  --radius:    10px;
  --font:      'Segoe UI', Arial, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--light);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
#header {
  background: var(--primary);
  color: #fff;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
#header .org-name {
  font-size: 0.85rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#header .course-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* --- Progress bar --- */
#progress-bar-wrap {
  background: #d0d7e2;
  height: 6px;
}
#progress-bar {
  background: var(--accent);
  height: 6px;
  width: 0%;
  transition: width 0.4s ease;
}

/* --- Layout --- */
#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
}

.slide {
  display: none;
  width: 100%;
  max-width: 780px;
  animation: fadeIn 0.3s ease;
}
.slide.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.slide-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

h1.slide-heading {
  font-size: 1.7rem;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 12px;
}
h2.slide-heading {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.slide-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 12px;
}
.slide-body p:last-child {
  margin-bottom: 0;
}

/* --- Callout boxes --- */
.callout {
  border-left: 4px solid var(--accent);
  background: #fdf6e8;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 8px 0;
}
.callout.danger {
  border-left-color: var(--danger);
  background: #fdf0ee;
}
.callout.success {
  border-left-color: var(--success);
  background: #edf7f1;
}
.callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
}

/* --- Lists --- */
.check-list, .red-flag-list, .step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  margin-right: 10px;
}
.red-flag-list li::before {
  content: '⚠';
  color: var(--accent);
  margin-right: 10px;
}
.step-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-num {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-list li .step-text {
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Scenario box --- */
.scenario {
  background: #f0f4fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.scenario .scenario-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ─── Gmail Workspace Mockup ─────────────────────────────── */
.gmail-window {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Top chrome bar */
.gmail-chrome {
  background: #f6f8fc;
  border-bottom: 1px solid #e0e0e0;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gmail-chrome-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #444;
  cursor: default;
  flex-shrink: 0;
}
.gmail-chrome-icon:hover { background: #e8eaed; }
.gmail-chrome-spacer { flex: 1; }
.gmail-chrome-label {
  font-size: 0.72rem;
  color: #5f6368;
  letter-spacing: 0.02em;
}

/* Subject line */
.gmail-subject-bar {
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.gmail-subject-text {
  font-size: 1.15rem;
  font-weight: 400;
  color: #202124;
  flex: 1;
  line-height: 1.3;
}
.gmail-label-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.gmail-label-inbox  { background: #e8f0fe; color: #1a73e8; }
.gmail-label-spam   { background: #fce8e6; color: #d93025; }

/* Email thread item */
.gmail-thread-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.gmail-thread-item:last-child { border-bottom: none; }

/* Avatar circle */
.gmail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}
.av-red    { background: #d93025; }
.av-blue   { background: #1a73e8; }
.av-green  { background: #188038; }
.av-orange { background: #e37400; }
.av-purple { background: #8430ce; }
.av-teal   { background: #007b83; }

/* Thread content */
.gmail-thread-content { flex: 1; min-width: 0; }

.gmail-thread-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.gmail-sender-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #202124;
}
.gmail-thread-date {
  font-size: 0.78rem;
  color: #5f6368;
  flex-shrink: 0;
}

/* Sender address row — shows collapsed name or expanded address */
.gmail-sender-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.gmail-sender-addr {
  font-size: 0.78rem;
  color: #5f6368;
}
.gmail-expand-btn {
  font-size: 0.72rem;
  color: #1a73e8;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0 2px;
  font-family: inherit;
  text-decoration: underline;
}

/* Expanded address detail panel */
.gmail-addr-detail {
  background: #f6f8fc;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #202124;
  margin-bottom: 10px;
  display: none;
  line-height: 1.8;
}
.gmail-addr-detail.open { display: block; }
.gmail-addr-detail .addr-label {
  color: #5f6368;
  display: inline-block;
  width: 56px;
  font-size: 0.77rem;
}
.gmail-addr-detail .addr-val { font-weight: 500; }
.gmail-addr-detail .addr-warn {
  color: #d93025;
  font-weight: 600;
  font-size: 0.77rem;
  margin-top: 4px;
}

/* Body text */
.gmail-body {
  font-size: 0.88rem;
  color: #202124;
  line-height: 1.65;
}
.gmail-body a, .gmail-phish-link {
  color: #1a73e8;
  text-decoration: underline;
  cursor: default;
}
.gmail-phish-link { color: #d93025; }

/* Reply bar */
.gmail-reply-bar {
  padding: 10px 20px 14px;
  display: flex;
  gap: 8px;
}
.gmail-reply-btn {
  font-size: 0.82rem;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  padding: 7px 18px;
  border-radius: 4px;
  border: 1px solid #dadce0;
  background: #fff;
  color: #444;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Spoof comparison table */
.spoof-compare {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.spoof-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: monospace;
}
.spoof-row.real   { background: #e6f4ea; border: 1px solid #a8d5b0; color: #188038; }
.spoof-row.fake   { background: #fce8e6; border: 1px solid #f4a9a6; color: #c62828; }
.spoof-row .sr-tag {
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.spoof-row.real .sr-tag { background: #188038; color: #fff; }
.spoof-row.fake .sr-tag { background: #c62828; color: #fff; }
.spoof-row .sr-note {
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  font-size: 0.78rem;
  font-style: italic;
  opacity: 0.8;
  margin-left: 4px;
}

.spoof-highlight {
  background: #fff3cd;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.88rem;
}

/* --- Quiz --- */
.quiz-progress {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: left;
  font-size: 0.97rem;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1.4;
}
.option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: #f0f4fa;
}
.option-btn.correct {
  border-color: var(--success);
  background: #edf7f1;
  color: var(--success);
  font-weight: 600;
}
.option-btn.incorrect {
  border-color: var(--danger);
  background: #fdf0ee;
  color: var(--danger);
}
.option-btn.reveal {
  border-color: var(--success);
  background: #edf7f1;
  color: var(--success);
  font-weight: 600;
}

.feedback-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.5;
  display: none;
}
.feedback-box.show { display: block; }
.feedback-box.correct {
  background: #edf7f1;
  border: 1px solid #a3d9b5;
  color: #1e6b3c;
}
.feedback-box.incorrect {
  background: #fdf0ee;
  border: 1px solid #f0a89e;
  color: #8c1f17;
}

/* --- Results --- */
.score-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 700;
}
.score-circle.pass {
  background: #edf7f1;
  border: 5px solid var(--success);
  color: var(--success);
}
.score-circle.fail {
  background: #fdf0ee;
  border: 5px solid var(--danger);
  color: var(--danger);
}
.score-circle .score-num {
  font-size: 2.2rem;
  line-height: 1;
}
.score-circle .score-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-heading {
  text-align: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 8px;
}
.result-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* --- Navigation --- */
#nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 780px;
  margin-top: 8px;
}
.btn {
  padding: 11px 28px;
  border-radius: var(--radius);
  font-size: 0.97rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { opacity: 0.88; }
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { opacity: 0.88; }
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* --- Footer --- */
#footer {
  background: var(--primary);
  color: rgba(255,255,255,0.5);
  text-align: center;
  font-size: 0.78rem;
  padding: 12px;
}
