/* @font-face declarados en WordPress via wp_add_inline_style (mismo origen, sin CORS) */

/* Variables en :root → disponibles en toda la página, no solo dentro de .tmw-root */
:root {
  --tmw-panel: rgba(255, 255, 255, 0.96);
  --tmw-panel-strong: #ffffff;
  --tmw-border: rgba(31, 41, 55, 0.1);
  --tmw-border-strong: rgba(31, 41, 55, 0.18);
  --tmw-text: #1f2933;
  --tmw-text2: #65372a;
  --tmw-muted: #64748b;
  --tmw-accent: #b93632;
  --tmw-accent-soft: rgba(185, 54, 50, 0.1);
  --tmw-disabled-bg: #f3f4f6;
  --tmw-disabled-text: #94a3b8;
  --tmw-success: #25aa6c;
  --tmw-success-soft: #eef8f2;
  --tmw-success-text: rgba(13, 107, 67, 0.69);
  --tmw-shadow: 0 18px 52px rgba(15, 23, 42, 0.16);
  --tmw-font-body: "Geist", sans-serif;
  --tmw-font-action: "Satoshi", sans-serif;
}

.tmw-root {
  position: relative;
  font-family: var(--tmw-font-body);
}

.tmw-root *,
.tmw-root *::before,
.tmw-root *::after {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

.tmw-launch {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-family: var(--tmw-font-action, "Satoshi", "Segoe UI", Arial, sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #b93632 0%, #d66a4d 100%);
  box-shadow: 0 14px 26px rgba(185, 54, 50, 0.22);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tmw-launch:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(185, 54, 50, 0.28);
}

.tmw-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
  padding: 12px;
  overflow: auto;
}

.tmw-modal.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-family: var(--tmw-font-body);
  z-index: 999999999999;
}

.tmw-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 25%),
    rgba(28, 18, 13, 0.68);
  backdrop-filter: blur(8px);
}

.tmw-shell {
  z-index: 1;
  width: 1140px;
  max-width: 1140px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border-radius: 16px;
  background: #fbf5ec;
}

.tmw-shell::-webkit-scrollbar {
  width: 12px;
}

.tmw-shell::-webkit-scrollbar-track {
  background: transparent;
}

.tmw-close {
  position: absolute;
  top: 18px;
  right: 30px;
  z-index: 8;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--tmw-accent);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

@media (max-width:1280px) {
  .tmw-close {
    background: var(--tmw-accent);
    color: #fff;
  }
}

.tmw-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: min(760px, calc(100dvh - 24px));
}

.tmw-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 24px;
  height: 100%;
  border-right: 1px solid var(--tmw-border);
  background: #fce9ae00;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.tmw-main {
  padding: 24px;
}

.tmw-brand-logo {
  display: block;
  width: 116px;
  max-width: 100%;
  height: auto;
}

.tmw-kicker,
.tmw-section-kicker {
  display: flex;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--tmw-accent);
}

.tmw-title {
  margin: 0;
  color: var(--tmw-text2);
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.tmw-sidebar-copy {
  color: var(--tmw-text2);
  font-size: 13.5px;
  line-height: 1.3;
  font-family: var(--tmw-font-body);
  font-weight: 400;
}

.tmw-family-card,
.tmw-family-picker,
.tmw-family-summary,
.tmw-existing-reservations {
  padding: 14px 14px 12px;
  border: 1px solid var(--tmw-border);
  border-radius: 14px;
  background: var(--tmw-panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  animation: tmw-fade-up 0.28s ease both;
}

.tmw-existing-reservations {
  display: grid;
  gap: 10px;
}

.tmw-existing-reservation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(13, 107, 67, 0.16);
  border-radius: 10px;
  background: rgba(37, 170, 108, 0.08);
}

.tmw-existing-reservation-info strong,
.tmw-existing-reservation-info span,
.tmw-existing-reservation-info p {
  display: block;
}

.tmw-existing-reservation-info strong {
  color: #0d6b43;
  font-size: 13px;
  font-weight: 700;
}

.tmw-existing-reservation-info span {
  margin-top: 3px;
  color: var(--tmw-text);
  font-size: 12.5px;
  font-weight: 600;
}

.tmw-existing-reservation-info p {
  margin: 4px 0 0;
  color: var(--tmw-muted);
  font-size: 12px;
  line-height: 1.35;
}

.tmw-reschedule-btn {
  border-color: rgba(13, 107, 67, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #eefaf4 100%);
  color: #0d6b43;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 10px 15px;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(13, 107, 67, 0.12);
  white-space: nowrap;
}

.tmw-reschedule-btn:hover {
  border-color: #0d6b43;
  background: linear-gradient(180deg, #ffffff 0%, #e4f6ec 100%);
  box-shadow: 0 12px 22px rgba(13, 107, 67, 0.18);
}

.tmw-reschedule-btn:focus-visible {
  outline: 2px solid rgba(13, 107, 67, 0.22);
  outline-offset: 2px;
}

.tmw-family-label {
  color: var(--tmw-text2);
  font-size: 14px;
  font-family: var(--tmw-font-body);
  font-weight: 500;
  max-width: 560px;
}

.tmw-family-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

/* tmw-inline-field comparte el mismo CSS que tmw-field */
.tmw-inline-field {
  position: relative;
  min-width: 0;
  /* necesario en contexto grid/flex */
}

.tmw-family-alert {
  display: none;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.tmw-family-alert.is-visible {
  display: block;
}

.tmw-family-alert.is-error {
  color: #9f2522;
  background: rgba(185, 54, 50, 0.1);
  border: 1px solid rgba(185, 54, 50, 0.14);
}

.tmw-family-alert.is-success {
  color: #0d6b43;
  background: rgba(37, 170, 108, 0.1);
  border: 1px solid rgba(37, 170, 108, 0.16);
}

.tmw-students,
.tmw-selected-students {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.tmw-selected-students {
  grid-template-columns: 1fr;
}

.tmw-students {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tmw-student-card {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--tmw-border);
  border-radius: 6px;
  background: #fff;
  color: var(--tmw-text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.tmw-student-card:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 54, 50, 0.34);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.tmw-student-card.is-selected {
  border-color: var(--tmw-accent);
  box-shadow: 0 0 0 3px var(--tmw-accent-soft);
}

.tmw-student-card.is-reserved:not(.is-reschedule-selected),
.tmw-student-card:disabled {
  opacity: 0.64;
  cursor: not-allowed;
  background: var(--tmw-disabled-bg);
  box-shadow: none;
}

.tmw-student-card.is-reserved:not(.is-reschedule-selected):hover,
.tmw-student-card:disabled:hover {
  transform: none;
  border-color: var(--tmw-border);
}

.tmw-student-card.is-reschedule-selected {
  border-color: #0d6b43;
  box-shadow: 0 0 0 3px rgba(37, 170, 108, 0.14);
}

.tmw-student-card strong {
  display: block;
  font-size: 12.5px;
  letter-spacing: -0.04em;
  font-family: var(--tmw-font-body);
  font-weight: 600;
}

.tmw-student-card span {
  display: block;
  margin-top: 4px;
  color: var(--tmw-muted);
  font-size: 12px;
}

.tmw-student-reservation-note {
  display: block;
  margin-top: 8px;
  color: #0d6b43;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.tmw-student-actions {
  margin-top: 12px;
}

.tmw-selected-student-chip {
  padding: 12px 14px;
  border: 1px solid var(--tmw-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tmw-text);
  font-size: 13px;
  line-height: 1.45;
}

.tmw-selected-student-name {
  display: block;
  color: var(--tmw-text);
  font-family: var(--tmw-font-body);
  font-size: 12.5px;
  font-weight: 600;
}

.tmw-selected-student-grade {
  display: block;
  margin-top: 4px;
  color: var(--tmw-muted);
  font-size: 12px;
}

.tmw-selection-card,
.tmw-meta-card,
.tmw-panel,
.tmw-stage-summary,
.tmw-form-summary-card {
  border: 1px solid var(--tmw-border);
  border-radius: 14px;
  background: var(--tmw-panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.tmw-selection-card {
  padding: 16px;
}

.tmw-selection-card:first-of-type {
  margin-top: 26px;
}

.tmw-selection-card span,
.tmw-meta-card span,
.tmw-helper,
.tmw-stage-summary span,
.tmw-form-summary-card span,
.tmw-progress-text small {
  display: block;
  color: var(--tmw-text2);
  font-size: 14px;
  font-weight: 500;
}

.tmw-selection-card strong,
.tmw-meta-card strong,
.tmw-stage-summary strong,
.tmw-form-summary-card strong {
  display: block;
  margin-top: 5px;
  color: var(--tmw-text);
  font-size: 14.5px;
  font-weight: 500;
}

.tmw-main-head {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.tmw-main-lock {
  display: grid;
  min-height: 520px;
}

.tmw-panel-lock {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
}

.tmw-panel-lock p {
  color: var(--tmw-muted);
  font-size: 13.5px;
  line-height: 1.3;
  font-family: var(--tmw-font-body);
  font-weight: 300;
  max-width: 560px;
}

.tmw-progress-shell {
  overflow: visible;
  padding-bottom: 2px;
}

.tmw-progress {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.tmw-progress-track,
.tmw-progress-fill {
  position: absolute;
  top: 28px;
  left: 0;
  height: 2px;
  border-radius: 999px;
}

.tmw-progress-track {
  background: rgba(31, 41, 55, 0.12);
}

.tmw-progress-fill {
  width: 0;
  background: #0d6b43b0;
  transition: width 0.28s ease;
}

.tmw-progress-step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
  width: 100%;
  border-radius: 999px;
}

.tmw-progress-step:disabled {
  cursor: default;
}

.tmw-progress-dot {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--tmw-border-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--tmw-muted);
  font-size: 20px;
  font-weight: 600;
  font-family: var(--tmw-font-action);
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.tmw-progress-text strong,
.tmw-progress-text small {
  display: block;
  color: var(--tmw-text);
  font-size: 13px;
}

.tmw-progress-text {
  min-width: 0;
}

.tmw-progress-text strong,
.tmw-progress-text small {
  white-space: nowrap;
}

.tmw-progress-step.is-current .tmw-progress-dot,
.tmw-progress-step.is-complete .tmw-progress-dot {
  border-color: var(--tmw-accent);
  background: linear-gradient(135deg, var(--tmw-accent) 0%, #d66a4d 100%);
  color: #fff;
}

.tmw-progress-step.is-current .tmw-progress-dot {
  transform: scale(1.06);
  box-shadow: 0 0 0 5px var(--tmw-accent-soft);
}

.tmw-progress-step.is-current .tmw-progress-text strong,
.tmw-progress-step.is-complete .tmw-progress-text strong {
  color: var(--tmw-accent);
}

.tmw-progress-step.is-complete {
  border: 1.5px solid var(--tmw-success);
  background: var(--tmw-success-soft);
}

.tmw-progress-step.is-complete .tmw-progress-dot {
  background: rgba(37, 170, 108, 0.16);
  border-color: rgba(37, 170, 108, 0.16);
  color: var(--tmw-success-text);
}

.tmw-progress-step.is-complete .tmw-progress-text strong,
.tmw-progress-step.is-complete .tmw-progress-text small {
  color: var(--tmw-success-text);
}

.--success-msg {
  text-align: center;
  justify-content: center;
}

.tmw-meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tmw-meta-card {
  padding: 14px 16px;
}

.tmw-alert {
  display: none;
  margin: 16px 0;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.tmw-alert.is-visible {
  display: block;
  animation: tmw-fade-up 0.24s ease;
}

.tmw-alert.is-error {
  color: #9f2522;
  background: rgba(185, 54, 50, 0.1);
  border: 1px solid rgba(185, 54, 50, 0.14);
}

.tmw-stage-wrap {
  min-height: 520px;
}

.tmw-stage {
  display: none;
}

.tmw-stage.is-active {
  display: block;
  animation: tmw-stage-in 0.28s cubic-bezier(.22, .61, .36, 1);
}

.tmw-panel {
  padding: 20px;
}

.tmw-panel-success {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.tmw-panel-success p {
  max-width: 450px;
  text-align: center;
  color: var(--tmw-muted);
  margin: 0 auto;
}

.tmw-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tmw-stage-head h3,
.tmw-panel h3 {
  margin: 0;
  color: var(--tmw-text2);
  font-size: 18px;
  font-family: var(--tmw-font-body);
  letter-spacing: -0.04em;
  font-weight: 500;
}

.tmw-stage-head p {
  margin: 8px 0 0;
  color: var(--tmw-muted);
  font-size: 14px;
  line-height: 1.55;
}

.tmw-calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tmw-month-title {
  min-width: 190px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--tmw-text);
}

.tmw-nav-btn,
.tmw-ghost-btn {
  appearance: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#tmwAddCompanionBtn {
  background: transparent;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;

}

.tmw-nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--tmw-border-strong);
  background: #fff;
  font-family: var(--tmw-font-action, "Satoshi", "Segoe UI", Arial, sans-serif);
  color: var(--tmw-text);
  font-size: 22px;
  line-height: 1;
}

.tmw-ghost-btn {
  border: 1px solid var(--tmw-text2);
  background: #f7d75c59;
  font-family: var(--tmw-font-action);
  color: var(--tmw-text2);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
}

.tmw-nav-btn:hover:not(:disabled),
.tmw-ghost-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 54, 50, 0.34);
}

.tmw-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tmw-dow,
.tmw-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 480px;
  margin: 0 auto;
}

.tmw-dow {
  margin-bottom: 10px;
}

.tmw-dow span {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--tmw-muted);
}

.tmw-day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px solid var(--tmw-border);
  border-radius: 8px;
  background: var(--tmw-panel-strong);
  color: var(--tmw-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px;
  text-align: right;
  animation: tmw-fade-up 0.26s ease both;
  animation-delay: calc(var(--tmw-delay, 0) * 18ms);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tmw-day-number {
  position: absolute;
  top: 9px;
  right: 6px;
  line-height: 1;
}

.tmw-day:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(185, 54, 50, 0.34);
  box-shadow: 0 0 0 3px var(--tmw-accent-soft);
}

.tmw-day.is-selected {
  border-color: var(--tmw-accent);
  box-shadow: 0 0 0 3px var(--tmw-accent-soft);
}

.tmw-day.is-disabled,
.tmw-day:disabled {
  cursor: not-allowed;
  box-shadow: none;
  background: var(--tmw-disabled-bg);
  color: var(--tmw-disabled-text);
  font-weight: 500;
  font-family: var(--tmw-font-action);
}

.tmw-day.is-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.tmw-helper {
  min-height: 18px;
  margin-top: 12px;
}

.tmw-stage-summary {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.tmw-form-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.tmw-form-summary-card {
  padding: 14px 16px;
}

.tmw-companions {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--tmw-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.tmw-companions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tmw-companions h4 {
  font-weight: 500;
  margin: 0;
  color: var(--tmw-text2);
  font-size: 14px;
  font-family: var(--tmw-font-body);
  letter-spacing: -0.04em;
}

.tmw-companions p {
  margin: 7px 0 0;
  color: var(--tmw-muted);
  font-size: 13px;
  line-height: 1.55;
}

.tmw-companion-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tmw-companion-add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.tmw-companion-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.tmw-companion-card {
  padding: 14px;
  border: 1px solid var(--tmw-border);
  border-radius: 12px;
  background: #fff;
  animation: tmw-fade-up 0.24s ease both;
}

.tmw-companion-card-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tmw-companion-card-title {
  margin: 0;
  color: var(--tmw-text);
  font-size: 13px;
  font-weight: 800;
}

.tmw-companion-remove {
  appearance: none;
  border: 1px solid rgba(185, 54, 50, 0.16);
  border-radius: 10px;
  background: rgba(185, 54, 50, 0.08);
  color: var(--tmw-accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.tmw-companion-remove:hover {
  transform: translateY(-1px);
  background: rgba(185, 54, 50, 0.13);
}

.tmw-companion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tmw-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.tmw-slot,
.tmw-slot-empty {
  border: 1px solid var(--tmw-border);
  border-radius: 12px;
  background: #fff;
}

.tmw-slot {
  padding: 14px;
  text-align: left;
  color: var(--tmw-text);
  cursor: pointer;
  animation: tmw-fade-up 0.28s ease both;
  animation-delay: calc(var(--tmw-delay, 0) * 34ms);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tmw-slot strong {
  display: block;
  font-size: 14px;
}

.tmw-slot span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--tmw-muted);
}

.tmw-slot:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(185, 54, 50, 0.34);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.tmw-slot.is-disabled,
.tmw-slot:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.tmw-slot.is-selected {
  border-color: var(--tmw-accent);
  box-shadow: 0 0 0 3px var(--tmw-accent-soft);
}

.tmw-slot-empty {
  padding: 20px;
  color: var(--tmw-muted);
  font-size: 14px;
  line-height: 1.6;
}

.tmw-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tmw-field {
  position: relative;
}

.tmw-field-full {
  grid-column: 1 / -1;
}

.tmw-field input,
.tmw-field textarea,
.tmw-inline-field .tmw-inline-input {
  width: 100%;
  border: 1.5px solid var(--tmw-border);
  border-radius: 6px;
  background: #fff;
  color: var(--tmw-text);
  font-family: var(--tmw-font-action);
  font-size: 14px;
  padding: 10px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tmw-field textarea {
  min-height: 120px;
  resize: vertical;
}

.tmw-field input[readonly],
.tmw-inline-field .tmw-inline-input[readonly] {
  cursor: not-allowed;
  background: var(--tmw-disabled-bg);
  color: var(--tmw-muted);
  caret-color: transparent;
}

/* Label: empieza centrada dentro del input */
.tmw-field label,
.tmw-inline-field label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 4px;
  /* siempre presente — evita salto de layout */
  color: var(--tmw-muted);
  font-family: var(--tmw-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
  background: transparent;
  /* transparente cuando está dentro del input */
  /* background NO se anima — cambia instantáneo para cortar el borde limpiamente */
  transition: top 0.18s ease, transform 0.18s ease,
    font-size 0.18s ease, font-weight 0.18s ease, color 0.18s ease;
}

/* Textarea: label arriba desde el inicio */
.tmw-field:has(textarea) label {
  top: 18px;
  transform: none;
}

/* Estado activo: borde resaltado */
.tmw-field input:focus,
.tmw-field textarea:focus,
.tmw-field input:not(:placeholder-shown),
.tmw-field textarea:not(:placeholder-shown),
.tmw-inline-field .tmw-inline-input:focus,
.tmw-inline-field .tmw-inline-input:not(:placeholder-shown) {
  border-color: var(--tmw-accent);
}

.tmw-field input[readonly],
.tmw-field input[readonly]:focus,
.tmw-inline-field .tmw-inline-input[readonly],
.tmw-inline-field .tmw-inline-input[readonly]:focus {
  border-color: var(--tmw-border);
  box-shadow: none;
}

/* Label flota hacia el borde superior */
.tmw-field input:focus+label,
.tmw-field textarea:focus+label,
.tmw-field input:not(:placeholder-shown)+label,
.tmw-field textarea:not(:placeholder-shown)+label,
.tmw-inline-field .tmw-inline-input:focus+label,
.tmw-inline-field .tmw-inline-input:not(:placeholder-shown)+label {
  top: 0;
  /* centro de la label = línea del borde superior */
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--tmw-accent);
  background: #fff;
  /* corta el borde instantáneamente (no animado) */
}

.tmw-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.tmw-actions-center {
  justify-content: center;
}

.tmw-submit {
  appearance: none;
  display: flex;
  border: 0;
  border-radius: 6px;
  padding: 6px;
  font-family: var(--tmw-font-action);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--tmw-accent);
  cursor: pointer;
  align-items: center;
}

#tmwSubmitBtn.is-reschedule {
  gap: 6px;
  justify-content: center;
  border: 1px solid var(--tmw-accent);
  background: var(--tmw-accent);
  font-family: var(--tmw-font-action);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
}

#tmwCloseSuccessBtn {
  border: 1px solid var(--tmw-text2);
  background: var(--tmw-text2);
  font-family: var(--tmw-font-action);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
}

.tmw-submit.tmw-submit-inline p {
  display: flex;
  width: 100px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--tmw-font-action);
  font-weight: 700;
  font-size: 14.5px;
}

.tmw-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.tmw-submit.is-loading:disabled {
  opacity: 1;
}

.tmw-submit-secondary {
  background: linear-gradient(135deg, #3f2a1f 0%, #5e4336 100%);
}

.fa-solid.fa-magnifying-glass {
  padding: 8px;
  background: #fff;
  border-radius: 4px;
  color: var(--tmw-accent);
  font-size: 12px;
  width:fit-content;
}

#tmwConfirmStudentsBtn {
  padding: 10px 14px;
  gap: 6px;
}

.fa-solid.fa-arrow-left {
  margin-right: 6px;
}

@keyframes tmw-stage-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tmw-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width:780px) {
  .tmw-progress-shell {
    overflow: visible;
  }

  .tmw-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .tmw-progress-track,
  .tmw-progress-fill {
    top: 31px;
    left: 31px;
    width: 2px;
    height: calc(100% - 62px);
  }

  .tmw-progress-step {
    width: 100%;
    padding: 10px 12px;
  }

  .tmw-progress-text strong,
  .tmw-progress-text small {
    white-space: normal;
  }
}

@media (max-width: 920px) {

  .tmw-layout,
  .tmw-meta-row,
  .tmw-form-summary,
  .tmw-companions-head,
  .tmw-companion-grid,
  .tmw-form-grid {
    display: flex;
    flex-direction: column;
  }

  .tmw-dow,
  .tmw-grid {
    width: 100%;
  }

  .tmw-companions-head {
    display: grid;
  }

  .tmw-sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--tmw-border);
    width: 100%;
  }

  .tmw-progress-shell {
    overflow-x: auto;
    padding-bottom: 4px;
    height: 250px;
  }

  .tmw-family-form {
    grid-template-columns: 1fr;
  }

  .tmw-existing-reservation {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .tmw-modal {
    padding: 6px;
  }

  .tmw-shell {
    max-height: calc(100dvh - 12px);
    border-radius: 24px;
  }

  .tmw-sidebar,
  .tmw-main {
    padding: 20px 18px;
  }

  .tmw-title {
    font-size: 30px;
  }

  .tmw-main {
    padding-top: 72px;
  }

  .tmw-panel {
    padding: 18px;
  }

  .tmw-stage-head {
    flex-direction: column;
    align-items: stretch;
  }

  .tmw-calendar-nav {
    justify-content: space-between;
  }

  .tmw-month-title {
    min-width: 0;
    flex: 1;
  }

  .tmw-slots {
    grid-template-columns: 1fr;
  }

  .tmw-actions,
  .tmw-actions-center {
    justify-content: stretch;
  }

  .tmw-submit,
  .tmw-ghost-btn {
    width: 100%;
  }
}
