:root {
  --ic-font-size: 1.05rem;
  --ic-max-width: 72rem;
}

/* Typography & layout */
body {
  font-size: var(--ic-font-size);
  line-height: 1.6;
  background-color: #ffffff;
  color: #212529;
}


/* Titles, general spacing */
h1,
h2,
h3,
h4,
h5 {
  line-height: 1.3;
}

p {
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.ai-font {
  color: #0291b9;
}

main.container {
  max-width: var(--ic-max-width);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Buttons */
.btn-next {
  background-color: #3b9594;
  border-color: #3b9594;
  color: #fff;
}

.btn-next:hover {
  background-color: #348786;
  border-color: #2d7776;
  color: #fff;
}

.tool-btn {
  width: 150px;
  /* fixed width */
  text-align: center;
  /* make the label centered */
}

/* === 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;
}

/* === Plan (amber) OUTLINE === */
.btn-outline-plan {
  background-color: transparent;
  border: 1px solid #d68b00;
  color: #d68b00;
}

.btn-outline-plan:hover {
  background-color: #d68b00;
  border-color: #d68b00;
  color: #fff;
}

/* === Apply (green) OUTLINE === */
.btn-outline-apply {
  background-color: transparent;
  border: 1px solid #3a8146;
  color: #3a8146;
}

.btn-outline-apply:hover {
  background-color: #3a8146;
  border-color: #3a8146;
  color: #fff;
}

/* === Report (purple) OUTLINE === */
.btn-outline-report {
  background-color: transparent;
  border: 1px solid #5b4ba0;
  color: #5b4ba0;
}

.btn-outline-report:hover {
  background-color: #5b4ba0;
  border-color: #5b4ba0;
  color: #fff;
}

/* === Reflect (rose) OUTLINE === */
.btn-outline-reflect {
  background-color: transparent;
  border: 1px solid #c44569;
  color: #c44569;
}

.btn-outline-reflect:hover {
  background-color: #c44569;
  border-color: #c44569;
  color: #fff;
}

/* Base icon button styling */
.icon-btn {
  background: transparent;
  border: none;
  padding: 6px 8px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

/* Incomplete tool icon (grey) */
.icon-incomplete {
  color: #6c757d;
  /* Bootstrap gray-600 */
}

.icon-incomplete:hover {
  color: #495057;
  /* slightly darker hover */
}

/* === Plan (amber) === */
.icon-plan-complete {
  color: #d68b00;
}

.icon-plan-complete:hover {
  color: #b97700;
}

/* === Apply (green) === */
.icon-apply-complete {
  color: #3a8146;
}

.icon-apply-complete:hover {
  color: #306d3a;
}

/* === Report (purple) === */
.icon-report-complete {
  color: #5b4ba0;
}

.icon-report-complete:hover {
  color: #4a3c87;
}

/* === Reflect (rose) === */
.icon-reflect-complete {
  color: #c44569;
}

.icon-reflect-complete:hover {
  color: #a63a59;
}

.delete-icon-btn i {
  font-size: 1.1rem;
}

.delete-icon-btn:hover i {
  color: #b30000;
}

/* === 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 stage textarea tint — strong + safe */
body.zone-plan textarea.form-control,
body.zone-plan input.form-control,
body.zone-plan select.form-control {
  background-color: rgba(214, 139, 0, 0.06) !important;
  border-color: rgba(214, 139, 0, 0.25) !important;
}

body.zone-plan textarea.form-control:focus,
body.zone-plan input.form-control:focus,
body.zone-plan select.form-control:focus {
  background-color: rgba(214, 139, 0, 0.18) !important;
  border-color: #d68b00 !important;
  box-shadow: 0 0 0 0.15rem rgba(214, 139, 0, 0.15) !important;
}

body.zone-plan {
  background-color: rgba(214, 139, 0, 0.02);
}

/* PLAN STAGE – make tables transparent */
body.zone-plan table,
body.zone-plan .table {
  background-color: transparent !important;
}

body.zone-plan .table > :not(caption) > * > * {
  background-color: transparent !important;
}




/* PLAN zone – darker structural elements */

body.zone-plan .card-header {
  background-color: rgba(214, 139, 0, 0);
}

/* PLAN – file input base */
body.zone-plan input.form-control[type="file"]::file-selector-button {
  background-color: rgba(214, 139, 0, 0.18) !important;
  border: 1px solid rgba(214, 139, 0, 0.35) !important;
  padding: 0.4rem 0.75rem;
  border-radius: 0.35rem;
  margin-right: 0.75rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* PLAN – hover override */
body.zone-plan input.form-control[type="file"]::file-selector-button:hover {
  background-color: rgba(214, 139, 0, 0.30) !important;
  box-shadow: 0 0 0 0.15rem rgba(214, 139, 0, 0.15);
  cursor: pointer;
}

/* PLAN – active press */
body.zone-plan input.form-control[type="file"]::file-selector-button:active {
  background-color: rgba(214, 139, 0, 0.40) !important;
}












.small-tool-buttons .btn {
  padding: 4px 6px;
}

.small-tool-buttons i {
  font-size: 1rem;
}

/* === Voice input styling === */

/* Reserve space inside inputs/areas for the mic */
.form-control.has-mic {
  padding-right: 2.5rem !important;
}

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

/* Mic inside textareas: top-right (avoids scrollbar) */
.textarea-mic-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  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;
  /* blue when hovered */
}

/* Pulse animation when listening */
.voice-btn.listening .bi-mic-fill {
  color: #0d6efd;
  animation: mic-pulse 1s infinite ease-in-out;
}

@keyframes mic-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.25);
    opacity: 0.6;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* Sparkle */
.ai-response-sparkle::after {
  content: "✨";
  position: absolute;
  left: 0.8rem;
  top: 0.25rem;
  font-size: 1.5rem;
  opacity: 0.85;
  pointer-events: none;
  animation: sparkle 2.2s infinite ease-in-out;
}

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

/* Sparkle */
.ai-response-sparkle-br::after {
  content: "✨";
  position: absolute;
  bottom: 0rem;
  right: 0.25rem;
  font-size: 1.5rem;
  opacity: 0.85;
  pointer-events: none;
  animation: sparkle 2.2s infinite ease-in-out;
}


/* Optional: nicer spacing */
.ai-response-sparkle li {
  padding-left: 0.25rem;
}

.ai-list {
  padding-left: 3rem;
}

/* 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;
  }
}

.ai-toggle-btn {
  font-weight: 500;
  background-color: #f8f9fa;
}



/* Simple Word-style toolbar look */
.editor-toolbar {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #f8f9fa;
  /* Bootstrap light */
  border: 1px solid #dee2e6;
}

.editor-toolbar .btn {
  font-size: 0.85rem;
}

.editor-toolbar .btn strong,
.editor-toolbar .btn em {
  font-size: 0.9rem;
}
/* Editor content styling – apply to the visible editor, not the hidden textarea */
.plan-editor-scope {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Headings */
.plan-editor-scope h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.plan-editor-scope h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.plan-editor-scope h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.plan-editor-scope h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Paragraphs */
.plan-editor-scope p {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

/* Lists */
.plan-editor-scope ul {
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
}

.plan-editor-scope li {
  margin-bottom: 0.15rem;
}

.ai-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;              /* OK */
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.75);
  z-index: 2000;
}

/* IMPORTANT: ensure d-none actually hides it */
.ai-loading-overlay.d-none {
  display: none !important;
}

.ai-loading-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  max-width: 520px;
  width: 100%;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 2.4rem;   /* sits just left of the mic */
  padding: 0;
  border: 0;
  background: transparent;
  color: #6c757d;
  line-height: 1;
  z-index: 2;
}

.copy-btn .bi {
  font-size: 1.1rem;
}

.copy-btn:hover,
.copy-btn:focus {
  color: #0d6efd;
}

.copy-confirm {
  position: absolute;
  top: -1.6rem;
  right: 2.2rem;
  font-size: 0.75rem;
  background: #198754;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}