/* Improve tertiary text contrast to meet WCAG 4.5:1 (was #909294 = 3.12:1) */
.text-body-tertiary { color: #6c757d !important; }
[data-bs-theme="dark"] .text-body-tertiary { color: #9ca3af !important; }

/* ==========================================================================
   Exercise Manager - Custom Styles
   ==========================================================================
   Consolidates all application-specific CSS. Organised by:
   1. Base / Global
   2. Layout panels & cards
   3. Typography & forms
   4. Buttons & icons
   5. Utility classes
   6. Progress bars
   7. Flash messages
   8. Mailer styles
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/* App-like interaction & base behaviour                                      */
/* -------------------------------------------------------------------------- */

html,
body {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  user-select: text;
  -webkit-user-select: text;
}

/* Faster tapping / reduce delay on touch devices */
* {
  touch-action: manipulation;
}

/* Remove link highlight on mobile */
a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Prevent image callout menu on iOS */
img {
  -webkit-touch-callout: none;
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                     */
/* -------------------------------------------------------------------------- */

body {
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  overscroll-behavior-y: none;

  /* iOS safe area */
  /*padding-bottom: calc(40px + env(safe-area-inset-bottom));*/

  margin: 0;

  background-color: #ebe7e3;
}

footer {
  background-color: #d8d7d1 !important;
}

/* --------------------------------------------------------------------------
   2. LAYOUT PANELS & CARDS
   -------------------------------------------------------------------------- */

.panel {
  background-color: #e2ddd7;
}

.section-panel {
  background-color: #f3f1ee;
}

.action-panel {
  background-color: #e3ddd8;
}

.dark-panel {
  background-color: #605B51;
}

/* Card used for forms and content areas */
.card-form {
  background-color: #f3f1ee;
}

/* Hero card on the landing page */
.card-hero {
  background-color: #e2ddd7;
}

/* Clickable card hover effect */
.card-hover {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Exercise pack cards — portrait style with coloured header */

.pack-card-header {
  min-height: 100px;
  color: #fff;
}

.pack-card-beginner {
  background: linear-gradient(135deg, #5a9e6f, #74b586);
}

.pack-card-intermediate {
  background: linear-gradient(135deg, #c48a3f, #d4a054);
}

.pack-card-advanced {
  background: linear-gradient(135deg, #b55a4e, #c4706a);
}

.pack-card-default {
  background: linear-gradient(135deg, #7a8a96, #95a3ad);
}





/* --------------------------------------------------------------------------
   3. TYPOGRAPHY & FORMS
   -------------------------------------------------------------------------- */

.form-label {
  font-size: 1.1rem;
  font-weight: 500;
  padding-top: 1rem;
}

/* --------------------------------------------------------------------------
   4. BUTTONS & ICONS
   -------------------------------------------------------------------------- */

/* Small circular action button (30x30) */
.btn-circle-sm {
  width: 30px;
  height: 30px;
}

/* Medium circular action button (40x40) */
.btn-circle-md {
  width: 40px;
  height: 40px;
}

.remove-icon {
  color: #6c757d;
  transition: color 0.15s ease-in-out;
}

.remove-icon:hover,
.remove-icon:focus {
  color: #dc3545;
}

/* --------------------------------------------------------------------------
   5. UTILITY CLASSES
   -------------------------------------------------------------------------- */

.link-primary {
  color: #036CBD;
}

.bg-custom {
  background-color: #F6F5F3;
}

.border-custom {
  border-color: #DAD8D6;
}

/* Inline forms (archive/unarchive/remove buttons alongside other elements) */
.form-inline {
  display: inline;
}

/* Thin progress bar */
.progress-thin {
  height: 10px;
}

/* Full-width progress bar segment (replaces inline style="width: 100%") */
.progress-bar-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   6. FLASH MESSAGES & ALERTS
   -------------------------------------------------------------------------- */

/* Flash Messages - Standardized
 * Positions alerts at bottom center with responsive sizing
 */

.flash-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 600px;
  z-index: 1060; /* Above modals (1055) */
  animation: slideUp 0.3s ease-out;
}

/* Slide up animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Responsive sizing */
@media (min-width: 576px) {
  .flash-message {
    width: 80vw;
  }
}

@media (min-width: 768px) {
  .flash-message {
    width: 60vw;
  }
}

@media (min-width: 992px) {
  .flash-message {
    width: 500px;
  }
}

/* Ensure text is readable */
.flash-message {
  word-wrap: break-word;
}

/* Add bottom margin if multiple alerts stack */
.flash-message + .flash-message {
  bottom: calc(20px + 80px); /* Stack second alert above first */
}

/* --------------------------------------------------------------------------
   7. MEDIA REPORT STYLES
   --------------------------------------------------------------------------
   Each theme replicates the visual identity of a major news outlet using
   web-safe fonts (the originals — BBC Reith, CNN Sans — are proprietary).
   -------------------------------------------------------------------------- */

/* Common base for all agency report themes */
.media-report {
  position: relative;
}

.media-report .headline,
.media-report .byline,
.media-report .dateline,
.media-report .lede,
.media-report .body {
  margin: 0;
  padding: 0;
}

.media-report .agency-label {
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ---- BBC News ----
   BBC uses Reith Sans/Serif (proprietary). Closest web-safe fallbacks:
   Headlines: Arial/Helvetica bold, dark black (#1a1a1a)
   Body: Georgia/serif, line-height 1.375 (per BBC GEL guide)
   Accent: #bb1919 red top border
   Byline: bold author name, grey role/date
   Clean white background, minimal decoration */

.media-report.bbc {
  border-top: 4px solid #bb1919;
  background-color: #fff;
}

.media-report.bbc .agency-label {
  color: #bb1919;
}

.media-report.bbc .headline {
  color: #1a1a1a;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.15;
}

.media-report.bbc .byline {
  color: #3a3a3a;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  font-style: normal;
}

.media-report.bbc .dateline {
  color: #6e6e6e;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
}

.media-report.bbc .lede {
  color: #1a1a1a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.media-report.bbc .body {
  color: #1a1a1a;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  line-height: 1.375;
}

/* ---- CNN ----
   CNN uses CNN Sans (proprietary, inspired by Helvetica Neue).
   Closest web-safe: 'Helvetica Neue', Helvetica, Arial.
   Accent: #cc0000 red
   Headlines: very bold, dark, large
   Body: clean sans-serif, generous line-height 1.7
   Byline: italic, lighter grey
   Distinctive red "BREAKING NEWS" / category label feel */

.media-report.cnn {
  border-left: 5px solid #cc0000;
  background-color: #fff;
}

.media-report.cnn .agency-label {
  color: #cc0000;
}

.media-report.cnn .headline {
  color: #0c0c0c;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.15;
}

.media-report.cnn .byline {
  color: #5c5c5c;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-style: italic;
}

.media-report.cnn .dateline {
  color: #777;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
}

.media-report.cnn .lede {
  color: #222;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.media-report.cnn .body {
  color: #222;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ---- Reuters ----
   Reuters uses a mix of sans-serif (Arial family) and serif.
   Accent: #ff8000 (Reuters orange)
   Headlines: bold sans-serif, dark
   Body: serif (Georgia), generous line-height
   Clean, professional, wire-service aesthetic
   Thin orange top border */

.media-report.reuters {
  border-top: 3px solid #ff8000;
  background-color: #fff;
}

.media-report.reuters .agency-label {
  color: #ff8000;
}

.media-report.reuters .headline {
  color: #1a1a1a;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.2;
}

.media-report.reuters .byline {
  color: #666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 400;
}

.media-report.reuters .dateline {
  color: #888;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
}

.media-report.reuters .lede {
  color: #1a1a1a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.media-report.reuters .body {
  color: #333;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ---- AP News (Associated Press) ----
   AP News uses a modern clean sans-serif.
   Accent: #ef3e42 (AP red)
   Headlines: bold sans-serif
   Body: clean sans-serif, high readability
   Byline: bold name + regular date, separated
   Minimal, utilitarian wire-service look */

.media-report.ap {
  border-top: 4px solid #ef3e42;
  background-color: #fff;
}

.media-report.ap .agency-label {
  color: #ef3e42;
}

.media-report.ap .headline {
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.2;
}

.media-report.ap .byline {
  color: #555;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  font-style: normal;
}

.media-report.ap .dateline {
  color: #888;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
}

.media-report.ap .lede {
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.media-report.ap .body {
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ---- Generic (wire service / unbranded) ----
   Traditional newspaper aesthetic: serif headlines, serif body.
   No strong brand accent — neutral grey borders. */

.media-report.generic {
  border-top: 2px solid #aaa;
  background-color: #fff;
}

.media-report.generic .agency-label {
  color: #666;
}

.media-report.generic .headline {
  color: #1a1a1a;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.2;
}

.media-report.generic .byline {
  color: #666;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.media-report.generic .dateline {
  color: #888;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
}

.media-report.generic .lede {
  color: #222;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.media-report.generic .body {
  color: #333;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {
  /* Hide navigation, buttons, and non-content elements */
  header, .navbar, .offcanvas,
  .d-print-none,
  .btn, a.btn,
  footer {
    display: none !important;
  }

  /* Reset layout constraints */
  body {
    font-size: 11pt;
    color: #000 !important;
    background: #fff !important;
  }

  .container-fluid, .row, .col-12, .col-lg-10, .col-xl-9, .col-xxl-8 {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  /* Section panels print cleanly */
  .section-panel {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin: 12pt 0 !important;
    padding: 12pt !important;
  }

  /* Progress bars print with borders */
  .progress {
    border: 1px solid #ccc;
    background-color: #f8f8f8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .progress-bar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Coloured result cards */
  .bg-success.bg-opacity-10,
  .bg-danger.bg-opacity-10,
  .bg-warning.bg-opacity-10 {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Links print as plain text */
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}

/* --------------------------------------------------------------------------
   9. INTERACTION PREVIEW STYLES
   Used in exercise tabletop/simulation views and interaction previews.
   -------------------------------------------------------------------------- */

/* WhatsApp-style message bubble */
.sim-message {
  background-color: #ffffff;
  border-radius: 12px 12px 12px 0;
  max-width: 60%;
  padding: 10px 14px;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.08);
}
.sim-message .msg-time {
  color: #999;
  font-size: 0.7rem;
  text-align: right;
  margin-top: 4px;
}
.sim-message-container {
  border: 3px solid #1a1a2e;
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  max-width: 360px;
  margin: 0 auto;
  overflow: hidden;
  background-color: #F4F1EC;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.sim-message-container .sim-message-body {
  flex-grow: 1;
}
.sim-message-statusbar {
  background-color: #F1F1E9;
  padding: 6px 16px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a1a2e;
}
.sim-message-statusbar .sim-message-time {
  letter-spacing: 0.02em;
}
.sim-message-statusbar .sim-message-indicators {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}
.sim-message-header {
  background-color: #F1F1E9;
  border-bottom: 1px solid #d9d9d9;
  padding: 8px 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1a1a2e;
}
.sim-message-header .sim-message-back {
  font-size: 1.1rem;
  color: #1a1a2e;
  line-height: 1;
  flex-shrink: 0;
}
.sim-message-header .sim-message-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  min-width: 0;
}
.sim-message-header .sim-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #cfcfcf;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sim-message-header .sim-message-avatar i {
  color: #fff;
  font-size: 0.9rem;
}
.sim-message-header .sim-message-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sim-message-header .sim-message-actions {
  display: flex;
  gap: 16px;
  color: #1a1a2e;
  flex-shrink: 0;
}
.sim-message-header .sim-message-actions i {
  font-size: 1rem;
}
.sim-message-body {
  padding: 20px 14px;
}
.sim-message-body .msg-to {
  color: #6c6c6c;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

/* Email-style */
.sim-email {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.sim-email-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
}
.sim-email-header .email-field {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}
.sim-email-header .email-field strong {
  color: #333;
  display: inline-block;
  width: 50px;
}
.sim-email-header .email-subject {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 8px;
  margin-bottom: 0;
}
.sim-email-body {
  padding: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
}

/* Phone call style */
.sim-call {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 3px solid #1a1a2e;
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  color: #fff;
  padding: 32px 32px 72px;
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.sim-call .caller-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.sim-call .caller-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}
.sim-call .call-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 8px;
}
.sim-call .call-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sim-call .call-action-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.sim-call .call-secondary-actions {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  margin-top: auto;
  margin-bottom: 20px;
}
.sim-call .call-secondary-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-call .call-secondary-btn i {
  color: #fff;
  font-size: 1rem;
}
.sim-call .call-secondary-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}
.sim-call .call-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: default;
}
.sim-call .call-btn-accept { background-color: #4cd964; }
.sim-call .call-btn-decline { background-color: #ff3b30; }
.sim-call .call-btn i { color: #fff; font-size: 1.4rem; }
.sim-call .call-btn.has-audio { cursor: pointer; }
.sim-call .call-btn.has-audio:hover { transform: scale(1.1); box-shadow: 0 0 16px rgba(76, 217, 100, 0.5); }
.sim-call .call-btn.is-playing { animation: pulse-green 1.5s ease-in-out infinite; }
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 217, 100, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(76, 217, 100, 0); }
}

.sim-call-dialogue {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 500px;
  margin: 20px auto 0;
  border-left: 4px solid #4cd964;
}
.sim-call-dialogue .dialogue-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #888;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

/* Face-to-face style */
.sim-face-to-face {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  border: 2px dashed #dee2e6;
  text-align: center;
}
.sim-face-to-face .ftf-icon {
  width: 64px;
  height: 64px;
  background-color: #e9ecef;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-face-to-face .ftf-icon i { font-size: 1.5rem; color: #6c757d; }

/* Audio playback style */
.sim-audio {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 16px;
  color: #fff;
  padding: 24px;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}
.sim-audio .audio-icon {
  width: 64px;
  height: 64px;
  background-color: rgba(255,255,255,0.2);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-audio .audio-icon i { font-size: 1.5rem; }
.sim-audio .audio-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 16px 0;
  height: 32px;
}
.sim-audio .audio-waveform .bar {
  width: 4px;
  background-color: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: audioWave 1.2s ease-in-out infinite;
}
@keyframes audioWave {
  0%, 100% { height: 8px; }
  50% { height: 28px; }
}

/* Social media post style */
.sim-social {
  background-color: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.sim-social-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sim-social-avatar {
  width: 44px;
  height: 44px;
  background-color: #1d9bf0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sim-social-avatar i { color: #fff; font-size: 1.1rem; }
.sim-social-header .social-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f1419;
  line-height: 1.2;
}
.sim-social-header .social-handle {
  font-size: 0.85rem;
  color: #536471;
}
.sim-social-body {
  padding: 0 16px 14px;
  font-size: 1rem;
  line-height: 1.5;
  color: #0f1419;
}
.sim-social-footer {
  padding: 10px 16px;
  border-top: 1px solid #e1e1e1;
  display: flex;
  gap: 48px;
  color: #536471;
  font-size: 0.85rem;
}
.sim-social-footer .social-action {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sim-social-footer .social-action i { font-size: 1rem; }
.sim-social-timestamp {
  padding: 0 16px 14px;
  font-size: 0.85rem;
  color: #536471;
}

/* --------------------------------------------------------------------------
   10. EXERCISE TIMELINE
   Vertical timeline with icon nodes, connector rail, and expandable cards.
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  padding-left: 3rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--bs-border-color);
}
.timeline-entry {
  position: relative;
  margin-bottom: 1.5rem;
}
.timeline-icon {
  position: absolute;
  left: -48px;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  background-color: #fff;
}
.timeline-icon.icon-interaction {
  background-color: var(--bs-primary-bg-subtle);
  border: 2px solid var(--bs-primary);
  color: var(--bs-primary);
}
.timeline-icon.icon-media {
  background-color: var(--bs-warning-bg-subtle);
  border: 2px solid var(--bs-warning);
  color: var(--bs-warning);
}
/* Horizontal connector from rail icon into card */
.timeline-card {
  position: relative;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background-color: #fff;
  transition: opacity 0.15s ease;
}
.timeline-card::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 20px;
  width: 14px;
  height: 2px;
  background-color: var(--bs-border-color);
}
/* De-emphasise completed/cancelled entries */
.timeline-entry.is-done .timeline-card { opacity: 0.6; }
.timeline-entry.is-done .timeline-icon { opacity: 0.6; }
/* Emphasise next upcoming entry */
.timeline-entry.is-next .timeline-card {
  border-color: var(--bs-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
/* Compact status chip */
.timeline-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.timeline-status.status-pending { background-color: var(--bs-secondary-bg); color: var(--bs-secondary); }
.timeline-status.status-delivered { background-color: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
.timeline-status.status-completed { background-color: var(--bs-success-bg-subtle); color: var(--bs-success); }
.timeline-status.status-released { background-color: var(--bs-success-bg-subtle); color: var(--bs-success); }
.timeline-status.status-skipped { background-color: var(--bs-warning-bg-subtle); color: #997404; }
/* Compact warning chip */
.timeline-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #997404;
  background-color: var(--bs-warning-bg-subtle);
  border: 1px solid rgba(255, 193, 7, 0.25);
  margin-bottom: 0.5rem;
}
/* Softer "Now" marker */
.timeline-now {
  position: relative;
  margin: 1rem 0;
}
.timeline-now::before {
  content: '';
  position: absolute;
  left: -48px;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 2px dashed var(--bs-danger);
  opacity: 0.5;
}
.timeline-now .timeline-now-label {
  position: relative;
  display: inline-block;
  background-color: var(--bs-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: -32px;
}
/* Detail items (inside collapse) */
.detail-item {
  display: flex;
  gap: 12px;
}
.detail-item-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  flex-shrink: 0;
}
.detail-item-rail .detail-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-item-rail .detail-icon i {
  font-size: 0.8rem;
  color: var(--bs-secondary);
}
.detail-item-rail .detail-line {
  width: 2px;
  flex-grow: 1;
  background-color: var(--bs-border-color);
  margin: 4px 0;
}
.detail-item-content {
  flex-grow: 1;
  padding-bottom: 16px;
}
.detail-item:last-child .detail-line {
  display: none;
}
.detail-item-content h6 {
  margin-bottom: 6px;
}
@media (max-width: 575.98px) {
  .timeline { padding-left: 2.5rem; }
  .timeline::before { left: 16px; }
  .timeline-icon { left: -40px; width: 34px; height: 34px; }
  .timeline-icon i { font-size: 0.85rem; }
  .timeline-card::before { display: none; }
}

/* --------------------------------------------------------------------------
   11. MAILER STYLES
   Note: Email clients require inline styles, so these are kept as reference.
   The mailer templates retain inline styles for email compatibility.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   12. EVALUATION FORM (rating-circle controls used in public_show.erb and
       respondent_preview.erb — moved out of inline <style> blocks for CSP)
   -------------------------------------------------------------------------- */

.rating-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  font-weight: 600;
  font-size: 0.9rem;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.rating-circle:hover {
  border-color: #212529;
  color: #212529;
  background-color: rgba(0, 0, 0, 0.03);
}
.rating-radio:checked + .rating-circle {
  border-color: #212529;
  background-color: #212529;
  color: #fff;
}

/* Only public_show uses the has-error highlight; harmless on preview. */
.question-card.has-error {
  border-color: #dc3545 !important;
}
