/* ============================================================
   jointeam_style.css
   Styles for the JoinTeam teacher registration form.
   Scoped under #jt-wrapper to avoid conflicts with host page.
   Color palette: teal primary, warm accent, clean white cards.
   ============================================================ */

/* ---- [C1] Reset & wrapper ---- */
#jt-wrapper *,
#jt-wrapper *::before,
#jt-wrapper *::after {
  box-sizing: border-box;
}

#jt-wrapper {
  max-width: 780px;
  margin: 24px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.10);
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
  color: #1a2e3b;
  line-height: 1.6;
}

/* ---- [C2] Header ---- */
#jt-header {
  background: linear-gradient(135deg, #1a5276 0%, #1e8449 100%);
  color: #fff;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

#jt-logo {
  height: 64px;
  width: auto;
  flex-shrink: 0;
  border-radius: 6px;
}

#jt-banner-text {
  flex: 1;
}

.jt-banner-title {
  margin: 0 0 4px 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.jt-banner-subtext {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.88;
}

/* ---- [C3] Progress bar ---- */
#jt-progress {
  background: #eaf0f6;
  padding: 14px 32px;
  border-bottom: 1px solid #d6e4f0;
  overflow-x: auto;
}

.jt-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: max-content;
}

.jt-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  text-align: center;
}

.jt-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #b2c7d9;
  z-index: 0;
}

.jt-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #b2c7d9;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: background 0.3s;
}

.jt-step.active .jt-step-circle {
  background: #1a5276;
}

.jt-step.completed .jt-step-circle {
  background: #1e8449;
}

.jt-step-label {
  margin-top: 5px;
  font-size: 10px;
  color: #6b8fa8;
  max-width: 72px;
  line-height: 1.3;
}

.jt-step.active .jt-step-label {
  color: #1a5276;
  font-weight: 600;
}

/* ---- [C4] Pages ---- */
.jt-page {
  display: none;
  padding: 36px 40px 24px;
  min-height: 300px;
}

.jt-page-active {
  display: block;
}

.jt-page-title {
  margin: 0 0 24px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a5276;
  border-bottom: 2px solid #d6e4f0;
  padding-bottom: 10px;
}

.jt-page-desc {
  color: #4a6274;
  margin-top: 0;
}

/* ---- [C5] Intro page ---- */
.jt-intro-text p {
  margin-bottom: 14px;
  color: #2c3e50;
  line-height: 1.75;
}

.jt-intro-image {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.jt-intro-btn-wrap {
  margin-top: 28px;
  text-align: center;
}

/* ---- [C6] Questions ---- */
.jt-form-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.jt-question {
  background: #f8fafc;
  border: 1px solid #e2ebf3;
  border-radius: 8px;
  padding: 16px 18px;
  transition: border-color 0.2s;
}

.jt-question:focus-within {
  border-color: #1a5276;
  background: #fff;
}

.jt-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a2e3b;
}

.jt-req-star {
  color: #c0392b;
  margin-left: 2px;
}

.jt-hint {
  font-size: 13px;
  color: #6b8fa8;
  margin: 0 0 8px 0;
}

.jt-note {
  font-size: 12px;
  color: #7f8c8d;
  font-style: italic;
  margin: 8px 0 0 0;
}

/* ---- [C7] Inputs ---- */
.jt-input,
.jt-select,
.jt-textarea {
  width: 100%;
  border: 1px solid #b2c7d9;
  border-radius: 6px;
  padding: 10px 13px;
  font-size: 14.5px;
  color: #1a2e3b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.jt-input:focus,
.jt-select:focus,
.jt-textarea:focus {
  outline: none;
  border-color: #1a5276;
  box-shadow: 0 0 0 3px rgba(26,82,118,0.12);
}

.jt-input-readonly {
  background: #eaf0f6;
  color: #4a6274;
  cursor: default;
}

.jt-textarea {
  resize: vertical;
  min-height: 96px;
}

.jt-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a5276' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ---- [C8] Radio & Checkbox groups ---- */
.jt-radio-group,
.jt-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.jt-radio-label,
.jt-checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: normal;
  padding: 6px 10px;
  border-radius: 5px;
  transition: background 0.15s;
}

.jt-radio-label:hover,
.jt-checkbox-label:hover {
  background: #eaf0f6;
}

.jt-radio,
.jt-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1a5276;
  flex-shrink: 0;
}

/* ---- [C9] Field error ---- */
.jt-field-error {
  font-size: 12.5px;
  color: #c0392b;
  margin-top: 5px;
  min-height: 16px;
}

/* ---- [C10] Email verify page ---- */
.jt-email-verify {
  max-width: 480px;
}

.jt-field-group {
  margin-bottom: 16px;
}

.jt-code-input {
  letter-spacing: 6px;
  font-size: 20px;
  text-align: center;
  max-width: 180px;
}

.jt-email-verify-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.jt-msg {
  margin-top: 10px;
  font-size: 13.5px;
  min-height: 20px;
}

.jt-msg-error  { color: #c0392b; }
.jt-msg-success { color: #1e8449; font-weight: 600; }
.jt-msg-info   { color: #1a5276; }

.jt-verified-banner {
  background: #d5f5e3;
  border: 1px solid #82e0aa;
  border-radius: 8px;
  padding: 12px 16px;
  color: #1e8449;
  font-weight: 600;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.jt-check {
  font-size: 20px;
}

/* ---- [C11] Buttons ---- */
.jt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
}

.jt-btn:active { transform: translateY(1px); }

.jt-btn-primary {
  background: #1a5276;
  color: #fff;
}
.jt-btn-primary:hover { background: #154360; box-shadow: 0 2px 8px rgba(26,82,118,0.25); }

.jt-btn-secondary {
  background: #6b8fa8;
  color: #fff;
}
.jt-btn-secondary:hover { background: #4a6274; }

.jt-btn-success {
  background: #1e8449;
  color: #fff;
}
.jt-btn-success:hover { background: #196f3d; box-shadow: 0 2px 8px rgba(30,132,73,0.25); }

.jt-btn-link {
  background: none;
  color: #1a5276;
  padding: 8px 6px;
  text-decoration: underline;
  font-size: 13.5px;
  font-weight: normal;
}
.jt-btn-link:hover { color: #154360; }

.jt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---- [C12] Navigation bar ---- */
#jt-nav {
  background: #f0f4f8;
  border-top: 1px solid #d6e4f0;
  padding: 14px 40px;
}

.jt-nav-error {
  font-size: 13px;
  color: #c0392b;
  min-height: 18px;
  margin-bottom: 8px;
}

#jt-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ---- [C13] Success page ---- */
.jt-success {
  text-align: center;
  padding: 16px 0;
}

.jt-success-icon {
  font-size: 56px;
  color: #1e8449;
  line-height: 1;
  margin-bottom: 12px;
}

.jt-success h2 {
  font-size: 1.6rem;
  color: #1a5276;
  margin-bottom: 12px;
}

.jt-success p {
  color: #4a6274;
  max-width: 480px;
  margin: 0 auto 20px;
  line-height: 1.8;
}

.jt-success-image {
  max-width: 320px;
  border-radius: 10px;
  margin: 0 auto 20px;
  display: block;
}

.jt-success-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---- [C14] Spinner (shown during AJAX) ---- */
.jt-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: jt-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes jt-spin {
  to { transform: rotate(360deg); }
}

/* ---- [C15] Responsive ---- */
@media (max-width: 600px) {
  #jt-wrapper { margin: 0; border-radius: 0; box-shadow: none; }
  .jt-page { padding: 24px 18px 16px; }
  #jt-header { padding: 16px 18px; flex-direction: column; text-align: center; }
  #jt-nav { padding: 12px 18px; }
  .jt-banner-title { font-size: 1.25rem; }
  #jt-progress { padding: 10px 18px; }
  .jt-step-label { display: none; }
  .jt-btn { padding: 10px 16px; font-size: 14px; }
}

/* ---- [C16] Coordinator dashboard wrapper ---- */
#jt-coord-wrapper {
  max-width: 1100px;
  margin: 24px auto;
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
  color: #1a2e3b;
  line-height: 1.6;
}

.jt-coord-title {
  font-size: 1.45rem;
  color: #1a5276;
  margin: 0 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #d6e4f0;
}

.jt-coord-empty {
  color: #6b8fa8;
  font-style: italic;
}

/* ---- [C16b] Month filter bar ---- */
#jt-month-filter {
  background: #eaf0f6;
  border: 1px solid #d6e4f0;
  border-radius: 8px;
  padding: 10px 14px 8px;
  margin-bottom: 16px;
  line-height: 2;
}

.jt-filter-view-all {
  margin-bottom: 4px;
}

.jt-filter-by-month {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 4px;
}

.jt-filter-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #4a6274;
  white-space: nowrap;
  margin-right: 6px;
  flex-shrink: 0;
}

.jt-filter-months {
  display: inline;
}

.jt-month-link {
  display: inline-block;
  color: #1a5276;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 4px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.jt-month-link:hover {
  background: #d0e8f5;
  color: #154360;
  text-decoration: none;
}

.jt-month-link.jt-month-active {
  color: #1e8449;
  font-weight: 700;
  background: #d5f5e3;
}

/* ---- [C17] Registrations table ---- */
.jt-reg-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  /* Reset site-global "table { margin:1rem; padding:1rem; }" so the table
     aligns flush with the detail panel below it. */
  margin: 0 0 28px 0;
  padding: 0;
}

.jt-reg-table th {
  background: #1a5276;
  color: #fff;
  padding: 11px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.jt-reg-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e8eff5;
  font-size: 14px;
  vertical-align: middle;
}

.jt-reg-table tbody tr:last-child td { border-bottom: none; }
.jt-reg-table tbody tr:hover { background: #f2f7fb; }
.jt-reg-row-active { background: #e8f4fd !important; }

/* Status badges */
.jt-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  background: #dce8f0;
  color: #1a5276;
}
.jt-s-onboarded           { background: #d5f5e3; color: #1e8449; }
.jt-s-willing_teacher     { background: #d6eaf8; color: #1a5276; }
.jt-s-orientation_complete { background: #e8daef; color: #6c3483; }
.jt-s-pending             { background: #fef9e7; color: #7d6608; }
.jt-s-unable_to_contact   { background: #fdedec; color: #922b21; }

.jt-reg-contact { font-size: 13px; line-height: 1.5; }
.jt-dim         { color: #b2c7d9; }

/* ---- [C18] Detail panel ---- */
#jt-detail-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  overflow: hidden;
  margin-top: 4px;
}

.jt-detail-toolbar {
  background: #f0f4f8;
  border-bottom: 1px solid #d6e4f0;
  padding: 10px 20px;
  display: flex;
  justify-content: flex-end;
}

.jt-detail-loading {
  padding: 24px;
  text-align: center;
  color: #6b8fa8;
  font-size: 14px;
}

.jt-spinner-dark {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26,82,118,0.2);
  border-top-color: #1a5276;
  border-radius: 50%;
  animation: jt-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.jt-detail-inner { padding: 24px 28px; }

.jt-detail-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #d6e4f0;
}

.jt-detail-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.2rem;
  color: #1a5276;
}

.jt-detail-meta { margin: 0; color: #6b8fa8; font-size: 13.5px; }

/* ---- [C19] Detail two-column layout ---- */
.jt-detail-cols {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.jt-detail-col { flex: 1; min-width: 0; }
.jt-detail-col-answers  { flex: 1.3; }
.jt-detail-col-activity { flex: 0.85; }

.jt-detail-section { margin-bottom: 24px; }

.jt-detail-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a5276;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2ebf3;
}

.jt-detail-sub-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a6274;
  margin: 16px 0 8px 0;
}

/* ---- [C20] Answers definition list ---- */
/* Stacked layout: label above value. Grid layouts fail here because
   question labels vary from 10 to 80+ characters, causing the auto
   column to expand and leave the answer column with near-zero width. */
.jt-answers-dl {
  margin: 0;
}

.jt-answers-dl dt {
  font-size: 11.5px;
  color: #6b8fa8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 0 2px 0;
  margin: 0;
}

.jt-answers-dl dd {
  margin: 0 0 4px 0;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #edf1f5;
  font-size: 14px;
  color: #1a2e3b;
  word-break: break-word;
  line-height: 1.5;
}

/* ---- [C21] Status history ---- */
.jt-status-save-msg {
  display: inline-block;
  margin-left: 10px;
  font-size: 12.5px;
  vertical-align: middle;
}

.jt-status-history,
.jt-notes-list {
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid #e2ebf3;
  border-radius: 6px;
  padding: 8px;
  background: #f8fafc;
}

.jt-status-log-entry {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 5px 4px;
  border-bottom: 1px solid #eaeff5;
  font-size: 13px;
}
.jt-status-log-entry:last-child { border-bottom: none; }

.jt-log-time   { color: #6b8fa8; font-size: 12px; white-space: nowrap; }
.jt-log-user   { color: #1a5276; font-weight: 600; }
.jt-log-status {
  background: #dce8f0; color: #1a5276;
  padding: 1px 8px; border-radius: 10px; font-size: 12px;
}
.jt-log-empty  { color: #6b8fa8; font-size: 13px; font-style: italic; margin: 4px 0; }

/* ---- [C22] Notes ---- */
.jt-note-entry {
  padding: 8px 6px;
  border-bottom: 1px solid #eaeff5;
}
.jt-note-entry:last-child { border-bottom: none; }

.jt-note-meta { font-size: 12px; color: #6b8fa8; margin-bottom: 3px; }

.jt-note-body { font-size: 14px; color: #2c3e50; white-space: pre-wrap; }

.jt-add-note-form { margin-top: 14px; }

.jt-add-note-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.jt-note-save-msg { font-size: 12.5px; }

/* ---- [C23] Responsive coordinator view ---- */
/* Columns: 1=#  2=Name  3=Email  4=Phone/Location  5=Submitted  6=Status  7=View */
@media (max-width: 960px) {
  /* hide Email */
  .jt-reg-table td:nth-child(3),
  .jt-reg-table th:nth-child(3) { display: none; }
}

@media (max-width: 820px) {
  .jt-detail-cols { flex-direction: column; }
  /* hide Phone/Location */
  .jt-reg-table td:nth-child(4),
  .jt-reg-table th:nth-child(4) { display: none; }
}

@media (max-width: 520px) {
  .jt-detail-inner { padding: 16px 14px; }
  /* hide Submitted */
  .jt-reg-table td:nth-child(5),
  .jt-reg-table th:nth-child(5) { display: none; }
}
