/* ============================================
   Coach4U Activity Design System — css/activity.css
   Version: 1.0
   Source of truth: coach4u-shared/templates/css/activity.css

   Use on: multi-step tools, worksheets, reflections, builders.
   NOT for: dashboard, auth, or purely informational pages.
   Pair with css/style.css on authenticated activity pages.
   Standalone on public activity pages.

   Requires Google Fonts in <head>:
     <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Montserrat:wght@400;500;600&display=swap" rel="stylesheet">
   ============================================ */

/* ----- Activity Tokens ----- */
:root {
  --act-dark-blue:    #1B3664;
  --act-light-blue:   #5684C4;
  --act-dark-grey:    #2D2D2D;
  --act-light-grey:   #DDDDDD;
  --act-bg:           #ffffff;
  --act-soft:         #F5F7FB;
  --act-radius-sm:    8px;
  --act-radius-md:    12px;
  --act-radius-lg:    16px;
  --act-shadow-sm:    0 1px 2px rgba(27, 54, 100, 0.06);
  --act-shadow-md:    0 4px 16px rgba(27, 54, 100, 0.08);
  --act-font-body:    'Montserrat', sans-serif;
  --act-font-heading: 'Inter', sans-serif;
}

/* ----- Body ----- */
/*
  Add class="activity-page" to <body> on activity pages.
  White background overrides the grey dashboard default.
*/
body.activity-page {
  background: var(--act-bg);
  font-family: var(--act-font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--act-dark-grey);
}

/* ----- Container ----- */
.act-container { max-width: 880px; margin: 0 auto; padding: 32px 20px 60px; }

/* ----- Back Link ----- */
.act-back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--act-light-blue);
  text-decoration: none;
  font-family: var(--act-font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s;
}
.act-back-link:hover { color: var(--act-dark-blue); text-decoration: none; }

/* ----- Page Header ----- */
.act-header { text-align: center; margin-bottom: 36px; }
.act-header h1 {
  font-family: var(--act-font-heading);
  font-weight: 700;
  color: var(--act-dark-blue);
  font-size: 2rem;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.act-header p {
  color: var(--act-dark-grey);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ----- Progress Stepper ----- */
.act-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.act-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--act-font-heading);
  font-size: 0.85rem;
  color: var(--act-light-grey);
  font-weight: 600;
}
.act-progress-step .num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--act-light-grey);
  color: white;
  display: grid; place-items: center;
  font-size: 0.8rem;
  transition: all 0.25s;
}
.act-progress-step.active { color: var(--act-dark-blue); }
.act-progress-step.active .num { background: var(--act-dark-blue); }
.act-progress-step.done { color: var(--act-light-blue); }
.act-progress-step.done .num { background: var(--act-light-blue); }
.act-progress-divider { width: 24px; height: 1px; background: var(--act-light-grey); }

/* ----- Step Card ----- */
.act-card {
  background: white;
  border: 1px solid var(--act-light-grey);
  border-radius: var(--act-radius-lg);
  padding: 32px 28px;
  box-shadow: var(--act-shadow-sm);
  margin-bottom: 20px;
}

/* ----- Step Typography ----- */
.act-step-label {
  font-family: var(--act-font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--act-light-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.act-step-title {
  font-family: var(--act-font-heading);
  font-weight: 700;
  color: var(--act-dark-blue);
  font-size: 1.35rem;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.act-step-prompt {
  color: var(--act-dark-grey);
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.65;
}
.act-step-hint {
  color: var(--act-light-blue);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 20px;
}

/* ----- Reference / Callout Block ----- */
.act-reference {
  background: var(--act-soft);
  border-left: 3px solid var(--act-light-blue);
  border-radius: 0 var(--act-radius-sm) var(--act-radius-sm) 0;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.act-reference-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--act-light-blue);
  margin-bottom: 4px;
}
.act-reference-text { font-size: 0.88rem; color: var(--act-dark-grey); line-height: 1.5; }

/* ----- Core / Large Emoji Tiles ----- */
.act-core-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .act-core-grid { grid-template-columns: repeat(2, 1fr); } }

.act-core-tile {
  background: white;
  border: 2px solid var(--act-light-grey);
  border-radius: var(--act-radius-md);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--act-font-heading);
  font-weight: 600;
  color: var(--act-dark-blue);
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}
.act-core-tile:hover { border-color: var(--act-light-blue); transform: translateY(-2px); box-shadow: var(--act-shadow-md); }
.act-core-tile.selected { background: var(--act-dark-blue); border-color: var(--act-dark-blue); color: white; }
.act-core-tile.selected::after { content: "\2713"; position: absolute; top: 8px; right: 10px; font-size: 0.85rem; font-weight: 700; }
.act-emoji { font-size: 1.8rem; line-height: 1; }

/* ----- Sub / Chip Tiles ----- */
.act-sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

.act-sub-tile {
  background: var(--act-soft);
  border: 1.5px solid transparent;
  border-radius: var(--act-radius-sm);
  padding: 14px 30px 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--act-font-body);
  font-weight: 500;
  color: var(--act-dark-grey);
  font-size: 0.95rem;
  position: relative;
}
.act-sub-tile:hover { border-color: var(--act-light-blue); background: white; }
.act-sub-tile.selected { background: var(--act-light-blue); border-color: var(--act-light-blue); color: white; font-weight: 600; }
.act-sub-tile.selected::after { content: "\2713"; position: absolute; top: 50%; right: 12px; transform: translateY(-50%); font-size: 0.85rem; font-weight: 700; }

/* ----- Nuance / Row Items ----- */
.act-nuance-list { display: flex; flex-direction: column; gap: 8px; }

.act-nuance-item {
  background: var(--act-soft);
  border: 1.5px solid transparent;
  border-radius: var(--act-radius-sm);
  padding: 12px 40px 12px 18px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}
.act-nuance-item:hover { border-color: var(--act-light-blue); background: white; }
.act-nuance-item.selected { background: white; border-color: var(--act-dark-blue); box-shadow: var(--act-shadow-sm); }
.act-nuance-item.selected::after { content: "\2713"; position: absolute; top: 50%; right: 16px; transform: translateY(-50%); font-size: 0.95rem; font-weight: 700; color: var(--act-dark-blue); }
.act-word { font-family: var(--act-font-heading); font-weight: 600; color: var(--act-dark-blue); flex-shrink: 0; min-width: 120px; }
.act-desc { color: var(--act-dark-grey); font-size: 0.9rem; }

/* ----- Section Title (within a step) ----- */
.act-section-title {
  font-family: var(--act-font-heading);
  font-weight: 600;
  color: var(--act-dark-blue);
  font-size: 1rem;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--act-light-grey);
}

/* ----- Summary Banner (Reflect step) ----- */
.act-summary-banner {
  background: linear-gradient(135deg, #1B3664 0%, #5684C4 100%);
  color: white;
  padding: 24px;
  border-radius: var(--act-radius-md);
  margin-bottom: 24px;
  text-align: center;
}
.act-summary-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.85; margin-bottom: 10px; font-weight: 500; }
.act-summary-words { font-family: var(--act-font-heading); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.3px; line-height: 1.4; }
.act-summary-path { font-size: 0.85rem; opacity: 0.85; margin-top: 12px; line-height: 1.6; }

/* ----- Reflect Prompts / Textareas ----- */
.act-reflect-prompts { display: flex; flex-direction: column; gap: 16px; }
.act-reflect-prompts label {
  font-family: var(--act-font-heading);
  font-weight: 600;
  color: var(--act-dark-blue);
  font-size: 0.93rem;
  margin-bottom: 6px;
  display: block;
}
.act-reflect-prompts textarea,
.act-textarea {
  width: 100%;
  border: 1.5px solid var(--act-light-grey);
  border-radius: var(--act-radius-sm);
  padding: 12px 14px;
  font-family: var(--act-font-body);
  font-size: 0.93rem;
  color: var(--act-dark-grey);
  background: white;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.15s;
}
.act-reflect-prompts textarea:focus,
.act-textarea:focus { outline: none; border-color: var(--act-light-blue); }

/* ----- "None of these fit" / Redirect Panel ----- */
.act-redirect-panel {
  margin-top: 20px;
  padding: 20px;
  background: var(--act-soft);
  border-radius: var(--act-radius-md);
  border: 1px solid var(--act-light-grey);
}
.act-redirect-panel p { font-size: 0.93rem; color: var(--act-dark-grey); margin-bottom: 14px; }
.act-redirect-panel p strong { font-family: var(--act-font-heading); color: var(--act-dark-blue); font-weight: 600; }
.act-redirect-options { display: flex; gap: 10px; flex-wrap: wrap; }

.act-none-fit-btn {
  margin-top: 20px;
  padding: 14px 18px;
  background: transparent;
  border: 1.5px dashed var(--act-light-grey);
  border-radius: var(--act-radius-sm);
  color: var(--act-dark-grey);
  font-family: var(--act-font-body);
  font-size: 0.9rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.act-none-fit-btn:hover { border-color: var(--act-light-blue); color: var(--act-dark-blue); background: var(--act-soft); }
.act-arrow { color: var(--act-light-blue); font-weight: 700; }

/* ----- Button Row ----- */
.act-button-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.act-btn {
  font-family: var(--act-font-heading);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 12px 24px;
  border-radius: var(--act-radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.act-btn-primary { background: var(--act-dark-blue); color: white; }
.act-btn-primary:hover { background: #14284d; color: white; text-decoration: none; }
.act-btn-primary:disabled { background: var(--act-light-grey); cursor: not-allowed; }
.act-btn-secondary { background: white; color: var(--act-dark-blue); border: 1.5px solid var(--act-light-grey); }
.act-btn-secondary:hover { border-color: var(--act-dark-blue); }

/* ----- Save Bar (worksheets / authenticated activities) ----- */
.act-save-bar {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid var(--act-light-grey);
  padding: 14px 0;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.act-save-status { font-size: 0.85rem; color: #888; flex: 1; }
.act-save-status.saved { color: #065f46; }
.act-save-status.error { color: #991b1b; }

/* ----- Info Card (reference panels, reports) ----- */
.act-info-card {
  background: white;
  border: 1px solid var(--act-light-grey);
  border-radius: var(--act-radius-md);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.act-info-card-title {
  font-family: var(--act-font-heading);
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--act-dark-blue);
  margin-bottom: 12px;
}
.act-info-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--act-dark-grey);
  line-height: 1.5;
}
.act-info-row:last-child { margin-bottom: 0; }
.act-info-label { font-family: var(--act-font-heading); font-weight: 700; color: var(--act-light-blue); flex-shrink: 0; min-width: 120px; }

/* ----- Footer ----- */
.act-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.78rem;
  color: var(--act-dark-grey);
  opacity: 0.7;
}
.act-footer a { color: var(--act-light-blue); text-decoration: none; }
.act-footer a:hover { color: var(--act-dark-blue); }

/* ----- Utility ----- */
.act-hidden { display: none; }

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .act-container { padding: 20px 16px 60px; }
  .act-card { padding: 24px 18px; }
  .act-step-title { font-size: 1.15rem; }
  .act-summary-words { font-size: 1.3rem; }
  .act-info-row { flex-direction: column; gap: 2px; }
  .act-info-label { min-width: unset; }
}
