/* ── Call-mode UI ─────────────────────────────────────────────────── */

/* Agenda bar */
#agendaBar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(20,24,33,0.92);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 0;
  padding: 0; z-index: 20;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4; font-size: 13px;
  overflow-x: auto;
  transition: transform .25s ease;
}
#agendaBar.hidden { transform: translateY(-100%); pointer-events: none; }
#agendaBar .seg {
  flex: 0 0 auto; padding: 7px 12px; cursor: pointer;
  border-right: 1px solid #333d4e; white-space: nowrap;
  transition: background .15s;
}
#agendaBar .seg.active {
  background: rgba(255,207,63,0.22);
  border-bottom: 2px solid #ffcf3f;
}
#agendaBar .seg.done { opacity: .5; }
#agendaBar .seg .seg-name { font-weight: bold; }
#agendaBar .seg .seg-time {
  font-size: 11px; color: #9fb0c8; margin-left: 6px;
}
#agendaBar .seg.overtime { background: rgba(220,40,40,0.25); }
#agendaBar .seg.overtime .seg-time { color: #ff6b6b; }

/* Segment time left display */
#segmentInfo {
  position: fixed; top: 40px; right: 16px;
  background: rgba(20,24,33,0.85);
  backdrop-filter: blur(4px);
  border-radius: 8px; padding: 8px 14px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4; font-size: 14px;
  z-index: 21;
}
#segmentInfo.hidden { display: none; }
#segmentInfo.overtime { color: #ff6b6b; }
#segmentInfo .seg-label { font-size: 11px; color: #9fb0c8; }

/* Call controls (below roster) */
#callControls {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(20,24,33,0.92);
  backdrop-filter: blur(4px);
  z-index: 19; display: none;
  flex-wrap: wrap; gap: 6px;
  align-items: center; justify-content: center;
  padding: 8px 10px;
  font-family: "Courier New", ui-monospace, monospace;
}
#callControls.show { display: flex; }

/* Reactions row */
#reactionsRow {
  display: flex; gap: 4px; align-items: center;
}
#reactionsRow button {
  font-size: 18px; padding: 4px 8px; min-width: 36px;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
  position: relative;
  font-family: "Courier New", ui-monospace, monospace;
}
#reactionsRow button:hover { background: #28323f; }
#reactionsRow button .badge {
  position: absolute; top: -6px; right: -6px;
  background: #ffcf3f; color: #1b2330;
  font-size: 10px; font-weight: bold;
  border-radius: 50%; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* Tangent quick-add */
#tangentQuick {
  display: flex; gap: 4px; align-items: center;
}
#tangentQuick input {
  width: 140px; padding: 5px 8px;
  font: inherit; font-size: 13px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#tangentQuick button {
  padding: 5px 10px; font-size: 13px;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}

/* Member reminder on banner */
#memberReminder {
  position: fixed; top: 42px; left: 50%; transform: translateX(-50%);
  background: rgba(20,24,33,0.78);
  backdrop-filter: blur(4px);
  border-radius: 8px; padding: 5px 14px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #ffcf3f; font-size: 12px;
  z-index: 21; white-space: nowrap;
  pointer-events: none;
}
#memberReminder.hidden { display: none; }

/* Principles overlay */
#principlesOverlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,14,22,0.95);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 30px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4;
  transition: opacity .3s;
}
#principlesOverlay.hidden { display: none; opacity: 0; }
#principlesOverlay h2 {
  color: #ffcf3f; font-size: 28px;
  margin-bottom: 24px; text-align: center;
}
#principlesOverlay .rules-text {
  max-width: 640px; font-size: 18px;
  line-height: 1.7; white-space: pre-wrap;
  text-align: left;
}
#principlesOverlay .close-btn {
  margin-top: 28px; padding: 10px 24px;
  font: inherit; font-size: 16px; font-weight: bold;
  border: 2px solid #d9ae23; border-radius: 8px;
  background: #ffcf3f; color: #1b2330; cursor: pointer;
}

/* Principles toggle (small banner) */
#principlesToggle {
  position: fixed; top: 42px; left: 16px;
  background: rgba(20,24,33,0.78);
  backdrop-filter: blur(4px);
  border-radius: 8px; padding: 4px 10px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #9fb0c8; font-size: 11px; cursor: pointer;
  z-index: 21;
}
#principlesToggle.hidden { display: none; }

/* Tangent review panel */
#tangentPanel {
  position: fixed; top: 60px; right: 16px;
  width: 320px; max-height: 60vh; overflow-y: auto;
  background: rgba(20,24,33,0.92);
  backdrop-filter: blur(6px);
  border-radius: 10px; padding: 12px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4; font-size: 12px;
  z-index: 22;
}
#tangentPanel.hidden { display: none; }
#tangentPanel h3 { color: #ffcf3f; margin: 0 0 8px; font-size: 14px; }
#tangentPanel .tangent-item {
  padding: 6px 0; border-bottom: 1px solid #333d4e;
  display: flex; flex-direction: column; gap: 4px;
}
#tangentPanel .tangent-item .tangent-text { flex: 1; }
#tangentPanel .tangent-item .tangent-who {
  font-size: 10px; color: #9fb0c8;
}
#tangentPanel .tangent-item .tangent-actions {
  display: flex; gap: 4px;
}
#tangentPanel .tangent-item .tangent-actions button {
  padding: 2px 8px; font-size: 10px;
  border: 1px solid #3a4456; border-radius: 4px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}
#tangentPanel .tangent-item .tangent-actions button.active {
  background: #ffcf3f; color: #1b2330; border-color: #d9ae23;
}

/* End-of-call summary */
#summaryOverlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,14,22,0.96);
  overflow-y: auto;
  padding: 30px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4;
}
#summaryOverlay.hidden { display: none; }
#summaryOverlay h2 { color: #ffcf3f; text-align: center; }
#summaryOverlay .summary-section {
  max-width: 700px; margin: 16px auto;
  background: rgba(30,36,50,0.8);
  border-radius: 10px; padding: 14px 18px;
}
#summaryOverlay .summary-section h3 {
  color: #9fb0c8; font-size: 13px; margin: 0 0 8px;
  text-transform: uppercase; letter-spacing: 1px;
}
#summaryOverlay table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
#summaryOverlay th, #summaryOverlay td {
  text-align: left; padding: 4px 8px;
  border-bottom: 1px solid #333d4e;
}
#summaryOverlay th { color: #9fb0c8; font-size: 11px; }
#summaryOverlay .summary-actions {
  text-align: center; margin: 24px 0;
}
#summaryOverlay .summary-actions button {
  margin: 0 8px; padding: 10px 20px;
  font: inherit; font-size: 14px; font-weight: bold;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}
#summaryOverlay .summary-actions button.primary {
  background: #ffcf3f; color: #1b2330; border-color: #d9ae23;
}

/* Commitment input */
#commitmentInput {
  display: flex; gap: 4px; align-items: center;
}
#commitmentInput input {
  width: 180px; padding: 5px 8px;
  font: inherit; font-size: 13px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#commitmentInput select {
  padding: 5px 6px; font: inherit; font-size: 12px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#commitmentInput button {
  padding: 5px 10px; font-size: 13px;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}

/* Pitch tracker */
#pitchRow { display: flex; gap: 4px; align-items: center; }
#pitchRow input {
  width: 120px; padding: 5px 8px;
  font: inherit; font-size: 13px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#pitchRow select {
  padding: 5px 6px; font: inherit; font-size: 12px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#pitchRow button {
  padding: 5px 10px; font-size: 13px;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}

/* Agenda template editor */
#agendaEditor {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,14,22,0.96);
  overflow-y: auto; padding: 30px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4;
}
#agendaEditor.hidden { display: none; }
#agendaEditor h2 { color: #ffcf3f; text-align: center; }
#agendaEditor .editor-wrap {
  max-width: 600px; margin: 16px auto;
}
#agendaEditor .seg-edit {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid #333d4e;
}
#agendaEditor .seg-edit input[type="text"] {
  flex: 1; padding: 5px 8px;
  font: inherit; font-size: 13px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#agendaEditor .seg-edit input[type="number"] {
  width: 60px; padding: 5px 8px;
  font: inherit; font-size: 13px; text-align: center;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#agendaEditor .seg-edit label {
  font-size: 10px; color: #9fb0c8;
}
#agendaEditor .editor-actions {
  text-align: center; margin: 20px 0;
}
#agendaEditor .editor-actions button {
  margin: 0 8px; padding: 10px 20px;
  font: inherit; font-size: 14px; font-weight: bold;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}
#agendaEditor .editor-actions button.primary {
  background: #ffcf3f; color: #1b2330; border-color: #d9ae23;
}

/* Open commitments panel (Phase 2 ready, works with localStorage too) */
#openCommitmentsPanel {
  position: fixed; top: 60px; left: 16px;
  width: 300px; max-height: 50vh; overflow-y: auto;
  background: rgba(20,24,33,0.92);
  backdrop-filter: blur(6px);
  border-radius: 10px; padding: 12px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4; font-size: 12px;
  z-index: 22;
}
#openCommitmentsPanel.hidden { display: none; }
#openCommitmentsPanel h3 { color: #ffcf3f; margin: 0 0 8px; font-size: 13px; }
#openCommitmentsPanel .commitment-item {
  padding: 5px 0; border-bottom: 1px solid #333d4e;
}
#openCommitmentsPanel .commitment-item .commitment-text { margin-bottom: 4px; }
#openCommitmentsPanel .commitment-item .commitment-actions {
  display: flex; gap: 4px; flex-wrap: wrap;
}
#openCommitmentsPanel .commitment-item .commitment-actions button {
  padding: 2px 6px; font-size: 10px;
  border: 1px solid #3a4456; border-radius: 4px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}
#openCommitmentsPanel .commitment-item .commitment-actions button:hover {
  background: #28323f;
}

/* Principles editor mini */
#principlesEditor {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,14,22,0.96);
  overflow-y: auto; padding: 30px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4;
}
#principlesEditor.hidden { display: none; }
#principlesEditor h2 { color: #ffcf3f; text-align: center; }
#principlesEditor .editor-wrap {
  max-width: 600px; margin: 16px auto;
}
#principlesEditor textarea {
  width: 100%; min-height: 200px; padding: 10px;
  font: inherit; font-size: 14px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
  resize: vertical;
}
#principlesEditor .editor-actions {
  text-align: center; margin: 20px 0;
}
#principlesEditor .editor-actions button {
  margin: 0 8px; padding: 10px 20px;
  font: inherit; font-size: 14px; font-weight: bold;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}
#principlesEditor .editor-actions button.primary {
  background: #ffcf3f; color: #1b2330; border-color: #d9ae23;
}

/* Member reminder editor */
#reminderEditor {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,14,22,0.96);
  overflow-y: auto; padding: 30px;
  font-family: "Courier New", ui-monospace, monospace;
  color: #f4f4f4;
}
#reminderEditor.hidden { display: none; }
#reminderEditor h2 { color: #ffcf3f; text-align: center; }
#reminderEditor .editor-wrap {
  max-width: 600px; margin: 16px auto;
}
#reminderEditor .member-row {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid #333d4e;
}
#reminderEditor .member-row label {
  min-width: 120px; font-size: 13px; color: #9fb0c8;
}
#reminderEditor .member-row input {
  flex: 1; padding: 5px 8px;
  font: inherit; font-size: 13px;
  border: 2px solid #3a4456; border-radius: 7px;
  background: #11151d; color: #f4f4f4;
}
#reminderEditor .editor-actions {
  text-align: center; margin: 20px 0;
}
#reminderEditor .editor-actions button {
  margin: 0 8px; padding: 10px 20px;
  font: inherit; font-size: 14px; font-weight: bold;
  border: 2px solid #2b3344; border-radius: 8px;
  background: #1d2533; color: #f4f4f4; cursor: pointer;
}
#reminderEditor .editor-actions button.primary {
  background: #ffcf3f; color: #1b2330; border-color: #d9ae23;
}

@media (max-width: 560px) {
  #agendaBar .seg { padding: 5px 8px; font-size: 11px; }
  #tangentPanel { width: 260px; }
  #openCommitmentsPanel { width: 240px; }
}
