:root { --ic-font-size: 1.05rem; --ic-max-width: 72rem; }
body { font-size: var(--ic-font-size); line-height: 1.6; }
body {
  background-color: #ffffff;
  color: #212529;
}

p {
  line-height: 1.65;  
  margin-bottom: 1.75rem;
}
h1, h2, h3, h4, h5 {
  line-height: 1.3;
}

li {
  line-height: 1.55;
}


main.container, header .container, footer .container { max-width: var(--ic-max-width); }
.navbar-brand { font-weight: 700; letter-spacing: .3px; }
.btn-primary { border-radius: .75rem; }
.card { border-radius: 1rem; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
footer { background: #f8f9fa; }
footer .container { color: #6c757d; }
.alert { border-radius: .5rem; }
.phase-tag {
  float: right;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.3px;
  margin-top: 0.25rem;
  margin-left: 1rem; /* keeps space from following text */
}

/* Zone-specific tag colours */
.zone-gather .phase-tag { background-color: #3b9594; }   /* teal */
.zone-plan .phase-tag   { background-color: #d68b00; }   /* warm orange */
.zone-apply .phase-tag  { background-color: #3a8146; }   /* green */
.zone-report .phase-tag { background-color: #5b4ba0; }   /* purple */
.zone-reflect .phase-tag{ background-color: #c44569; }   /* pink/red */

.zone-gather main.container,
.zone-plan main.container,
.zone-apply main.container,
.zone-report main.container,
.zone-reflect main.container {
  background: #fff; border-radius: 1rem; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

/* === Zone-adaptive input styling === */

/* Base form control look */
.form-control {
  border: 1px solid #d6d6d6;
  border-radius: 0.5rem;
  color: #212529;
  transition: all 0.15s ease-in-out;
}

.form-control {
  background-color: #f8f9fa;   /* Bootstrap’s light gray */
  border: 1px solid #d6d6d6;
  border-radius: 0.5rem;
  color: #212529;
  transition: all 0.15s ease-in-out;
}

.form-control:focus {
  background-color: #fff;
  border-color: #3b9594;
  box-shadow: 0 0 0 0.15rem rgba(59, 149, 148, 0.25);
}

/* Read-only or disabled fields stay softly muted */
.form-control:disabled,
.form-control[readonly] {
  background-color: #f2f2f2;
  opacity: 1;
}

/* Placeholder text stays light grey */
::placeholder {
  color: #adb5bd !important;
  font-style: italic;
}

/* === Fix readonly field appearance so it matches zone === */

/* Base readonly style */
.form-control[readonly] {
  background-color: inherit !important;   /* inherit zone tint */
  border-style: dashed;                   /* subtle visual cue */
  color: #6c757d;                         /* muted text */
  opacity: 1;                             /* ensure not faded */
  cursor: default;
}

/* Optional: keep rounded consistency */
.form-control[readonly] {
  border-radius: 0.5rem;
}



.flow-hub {
  background: #f9fbff;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  display: inline-block;
}

.flow-hub table {
  width: auto; /* shrink-wrap table to content */
}

.flow-hub td {
  vertical-align: middle;
  border: none;
  padding: 0.4rem 0.8rem;
}

.flow-hub a.btn-primary {
  white-space: nowrap;
}

/* Left hub container (sets up line alignment) */
.flow-hub-left {
  position: relative;
}

/* Vertical connector line – aligned to arrow head */
.flow-hub-left::after {
  content: "";
  position: absolute;
  top: 0;
  /* shift line farther right to align with arrow tip */
  right: -0.3rem;
  height: 100%;
  width: 2px;
  background-color: rgba(13, 110, 253, 0.25); /* soft Bootstrap blue */
}

/* Arrow immediately after Gather button */
.gather-cell::after {
  content: "→";
  font-weight: 600;
  color: #0d6efd;
  position: absolute;
  top: 50%;
  right: -1.1rem;  /* positions arrow head just before the line */
  transform: translateY(-50%);
  font-size: 1.2rem;
  z-index: 2; /* ensures arrow draws above the line */
}

/* Keep button text on one line */
.gather-cell a.btn-primary {
  white-space: nowrap;
}

/* === Themed buttons for each zone === */

/* === Gather (teal) === */
.btn-gather {
  background-color: #3b9594;
  border: 1px solid #3b9594;
  color: #fff;
}
.btn-gather:hover {
  background-color: #2f7a79;
  border-color: #2f7a79;
  color: #fff;
}


/* === Plan (amber) === */
.card-plan {
  border-left: 5px solid #d68b00;
  background-color: rgba(214, 139, 0, 0.08);
}
.card-plan:hover {
  box-shadow: 0 0 12px rgba(214, 139, 0, 0.3);
  transform: translateY(-3px);
}

/* === Apply (green) === */
.card-apply {
  border-left: 5px solid #3a8146;
  background-color: rgba(58, 129, 70, 0.08);
}
.card-apply:hover {
  box-shadow: 0 0 12px rgba(58, 129, 70, 0.3);
  transform: translateY(-3px);
}

/* === Report (purple) === */
.card-report {
  border-left: 5px solid #5b4ba0;
  background-color: rgba(91, 75, 160, 0.08);
}
.card-report:hover {
  box-shadow: 0 0 12px rgba(91, 75, 160, 0.3);
  transform: translateY(-3px);
}

/* === Reflect (rose) === */
.card-reflect {
  border-left: 5px solid #c44569;
  background-color: rgba(196, 69, 105, 0.08);
}
.card-reflect:hover {
  box-shadow: 0 0 12px rgba(196, 69, 105, 0.3);
  transform: translateY(-3px);
}

/* Shared transition */
.card-plan, .card-apply, .card-report, .card-reflect {
  transition: all 0.25s ease-in-out;
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.card-plan h5, .card-apply h5, .card-report h5, .card-reflect h5 {
  font-weight: 600;
}

/* === Plan (amber) === */
.btn-plan {
  background-color: #d68b00;
  border: 1px solid #d68b00;
  color: #fff;
}
.btn-plan:hover {
  background-color: #b97700;
  border-color: #b97700;
  color: #fff;
}

/* === Apply (green) === */
.btn-apply {
  background-color: #3a8146;
  border: 1px solid #3a8146;
  color: #fff;
}
.btn-apply:hover {
  background-color: #306d3a;
  border-color: #306d3a;
  color: #fff;
}

/* === Report (purple) === */
.btn-report {
  background-color: #5b4ba0;
  border: 1px solid #5b4ba0;
  color: #fff;
}
.btn-report:hover {
  background-color: #4a3c87;
  border-color: #4a3c87;
  color: #fff;
}

/* === Reflect (rose) === */
.btn-reflect {
  background-color: #c44569;
  border: 1px solid #c44569;
  color: #fff;
}
.btn-reflect:hover {
  background-color: #a63a59;
  border-color: #a63a59;
  color: #fff;
}

/* === Unified button styling === */
.btn {
  border-radius: 0.5rem !important;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

/* Save button (now same teal-blue as Next) */
.btn-success {
  background-color: #3b9594;
  border-color: #3b9594;
  color: #fff;
}
.btn-success:hover,
.btn-success:focus {
  background-color: #337f7e;  /* slightly darker hover */
  border-color: #337f7e;
  color: #fff;
}

/* Save changes (yellow warning) already handled via Bootstrap */

/* Next (teal tone) */
.btn-next {
  background-color: #3b9594;
  border-color: #3b9594;
  color: #fff;
}
.btn-next:hover {
  background-color: #348786;
  border-color: #2d7776;
  color: #fff;
}

/* Generate AI (outline, custom purple) */
.btn-ai {
  background-color: #5a1a6e;
  border: 1px solid #5a1a6e;
  color: #fff;
}

.btn-ai:hover,
.btn-ai:focus {
  background-color: transparent;
  color: #5a1a6e;
  border-color: #5a1a6e;
}

/* Back (Bootstrap secondary) */
.btn-outline-secondary {
  border-radius: 0.5rem !important;
}

/* Optional toast for feedback (Bootstrap 5 compatible) */
.toast {
  border-radius: 0.5rem;
  background-color: #f7f7f7;
}


/* Text link for AI-related inline actions (teal-blue to match Next button) */
.text-ai {
  color: #3b9594 !important;     /* same as Next button */
  font-weight: 500;
  text-decoration: none;
}

.text-ai:hover,
.text-ai:focus {
  color: #337f7e !important;     /* slightly darker hover */
  text-decoration: underline;
}

/* Save success alert (inline) */
#saveAlert {
  font-weight: 500;
  margin-top: 2px;
}

/* Hide inline save messages */
#saveAlert,
.save-inline-messages {
  display: none !important;
}

/* --- Form visual polish --- */

/* Make all form labels lighter and a bit smaller */
.form-label {
  font-weight: 500;
  font-size: 0.925rem;
  color: #6c757d;  /* Bootstrap muted grey */
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}

/* Placeholder text: soft grey, slightly italic for clarity */
::placeholder {
  color: #adb5bd !important;   /* lighter grey */
  opacity: 1;                  /* ensure consistent across browsers */
  font-style: italic;
}

/* Inputs: keep strong border but soften background on focus */
.form-control:focus {
  border-color: #3b9594;       /* your teal accent */
  box-shadow: 0 0 0 0.15rem rgba(59, 149, 148, 0.25);
}

/* Optional: slightly round inputs for consistency with buttons */
.form-control {
  border-radius: 0.5rem;
}
/* Reserve space inside inputs/areas for the mic */
.form-control.has-mic { padding-right: 2.25rem !important; }

/* Mic inside single-line inputs: vertically centered */
.input-mic-btn {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  padding: 0;
  border: 0;
  background: transparent;
  color: #6c757d;  /* muted */
  line-height: 1;
  z-index: 2;
}

/* Mic inside textareas: sit at top-right (avoids scrollbar overlap) */
.textarea-mic-btn {
  position: absolute;
  top: .5rem;
  right: .5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6c757d;
  line-height: 1;
  z-index: 2;
}

.input-mic-btn .bi,
.textarea-mic-btn .bi {
  font-size: 1.1rem;
}

.input-mic-btn:hover, .input-mic-btn:focus,
.textarea-mic-btn:hover, .textarea-mic-btn:focus {
  color: #0d6efd;
}

/* --- Mic animation (pulse only, no text) --- */
.voice-btn.listening .bi-mic-fill {
  color: #0d6efd; /* blue when active */
  animation: pulse 1s infinite ease-in-out;
}

@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.25); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.ai-response-gather {
  background-color: rgba(59, 149, 148, 0.12);
  border-left: 4px solid rgba(59, 149, 148, 0.8);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}



.ai-response-sparkle {
  position: relative;
}

/* ✨ Sparkle icon positioned top-right */
.ai-response-sparkle::after {
  content: "✨";
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  font-size: 1.8rem;
  opacity: 0.85;
  animation: sparkle 2.2s infinite ease-in-out;
  pointer-events: none; /* don’t block clicks or text selection */
}

/* Soft tint and padding for the textarea itself */
.ai-response-sparkle textarea {
  background-color: rgba(59,149,148,0.12); /* light #3b9594 tint */
  border-left: 4px solid #3b9594;
  border-radius: 0.5rem;
  padding-right: 2.6rem;   /* ✅ keeps text clear of the sparkle */
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Simple pulse animation */
@keyframes sparkle {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.3); opacity: 1; }
}
