/* ============================================================
   AHCD — Landing: Modal · Formularios · Calendario
   Todos los valores en px (el root usa 62.5% en la landing).
   ============================================================ */

/* ── Modal overlay ── */
.ahcd-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ahcd-modal[hidden] { display: none !important; }

.ahcd-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 25, 45, 0.65);
  backdrop-filter: blur(4px);
}

.ahcd-modal__box {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  padding: 40px 40px 36px;
  font-size: 14px;
  line-height: 1.5;
  font-family: 'Lato', -apple-system, sans-serif;
}

.ahcd-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #F5F5F5;
  cursor: pointer;
  font-size: 15px;
  color: #4A4A4A;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
  flex-shrink: 0;
}
.ahcd-modal__close:hover { background: #e0e0e0; }

/* ── Modal header ── */
.ahcd-modal__title {
  font-family: 'Lato', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 8px;
  padding-right: 40px;
  line-height: 1.25;
}
.ahcd-modal__subtitle {
  font-size: 14px;
  color: #4A4A4A;
  margin-bottom: 28px;
  line-height: 1.65;
}

/* ── Steps ── */
.ahcd-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.ahcd-step {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 100px;
  background: #F5F5F5;
  color: #BDBDBD;
}
.ahcd-step--active { background: #1E3A5F; color: #fff; }
.ahcd-step--done   { background: #E3EDF8; color: #1E3A5F; }

/* ── Form ── */
.ahcd-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ahcd-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ahcd-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #4A4A4A;
}
.ahcd-field input,
.ahcd-field select,
.ahcd-field textarea {
  padding: 11px 14px;
  border: 1.5px solid #BDBDBD;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.ahcd-field input:focus,
.ahcd-field select:focus,
.ahcd-field textarea:focus {
  border-color: #1E3A5F;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}
.ahcd-field textarea { resize: vertical; min-height: 88px; }

.ahcd-row {
  display: flex;
  gap: 12px;
}
.ahcd-row .ahcd-field { flex: 1; min-width: 0; }

/* ── Buttons ── */
.ahcd-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.ahcd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, filter 0.18s, box-shadow 0.18s, border-color 0.18s;
  white-space: nowrap;
  line-height: 1;
}
.ahcd-btn--primary { background: #C62828; color: #fff; }
.ahcd-btn--primary:hover { }
.ahcd-btn--secondary { background: transparent; color: #4A4A4A; border: 1.5px solid #BDBDBD; }
.ahcd-btn--secondary:hover { }
.ahcd-btn--blue { background: #1E3A5F; color: #fff; }
.ahcd-btn--blue:hover { }
.ahcd-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Error / messages ── */
.ahcd-form-error {
  background: #FFEBEE;
  border: 1px solid #FFCDD2;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #C62828;
}

/* ── Success screen ── */
.ahcd-success {
  text-align: center;
  padding: 32px 16px;
}
.ahcd-success__icon { font-size: 52px; display: block; margin-bottom: 16px; }
.ahcd-success__title {
  font-family: 'Lato', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 10px;
}
.ahcd-success__text {
  font-size: 15px;
  color: #4A4A4A;
  line-height: 1.65;
  max-width: 440px;
  margin: 0 auto 28px;
}

/* ── Slot recap banner ── */
.ahcd-slot-recap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #E8F0F9;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 20px;
}
.ahcd-no-slots {
  text-align: center;
  padding: 32px 20px 24px;
  background: #f5f7fa;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* ── Selector de profesionales ── */
.ahcd-prof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
@media (min-width: 480px) {
  .ahcd-prof-grid { grid-template-columns: repeat(4, 1fr); }
}
.ahcd-prof-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid #BDBDBD;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  font-family: 'Lato', sans-serif;
}
.ahcd-prof-btn:hover {
}
.ahcd-prof-btn__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #1E3A5F;
  color: #fff;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ahcd-prof-btn__name {
  font-size: 14px;
  font-weight: 700;
  color: #1E3A5F;
}
.ahcd-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #dce8f5;
  border-top-color: #1E3A5F;
  border-radius: 50%;
  animation: ahcd-spin .7s linear infinite;
}
@keyframes ahcd-spin { to { transform: rotate(360deg); } }

/* ── Calendar ── */
.ahcd-calendar {
  border: 1.5px solid #BDBDBD;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.ahcd-calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1E3A5F;
  padding: 12px 16px;
}
.ahcd-calendar__nav-btn {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.ahcd-calendar__nav-btn:hover { }
.ahcd-calendar__month {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-transform: capitalize;
}

.ahcd-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fff;
}
.ahcd-calendar__dow {
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4A4A4A;
  background: #F5F5F5;
  border-bottom: 1px solid #BDBDBD;
}
.ahcd-calendar__cell {
  min-height: 40px;
  padding: 6px 4px 4px;
  text-align: center;
  font-size: 13px;
  color: #4A4A4A;
  border-right: 1px solid #F5F5F5;
  border-bottom: 1px solid #F5F5F5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: default;
  position: relative;
}
.ahcd-calendar__cell--empty { background: #FAFAFA; }
.ahcd-calendar__cell--past  { color: #BDBDBD; background: #FAFAFA; }
.ahcd-calendar__cell--avail {
  cursor: pointer;
  font-weight: 700;
  background: #fff;
  transition: background 0.15s;
}
.ahcd-calendar__cell--avail:hover { background: #E8F0F9; color: #1E3A5F; }
.ahcd-calendar__cell--selected {
  background: #1E3A5F !important;
  color: #fff !important;
}
.ahcd-calendar__cell--selected .ahcd-dot { background: #fff; }
.ahcd-calendar__cell--today { outline: 2px solid #C62828; outline-offset: -2px; }

.ahcd-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C62828;
  flex-shrink: 0;
}

/* ── Time slots ── */
.ahcd-timeslots {
  border-top: 1px solid #BDBDBD;
  padding: 16px;
  background: #FAFAFA;
}
.ahcd-timeslots__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4A4A4A;
  margin-bottom: 12px;
}
.ahcd-timeslots__grid { display: flex; flex-wrap: wrap; gap: 8px; }

.ahcd-timeslot {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid #1E3A5F;
  background: #fff;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1E3A5F;
  cursor: pointer;
  transition: all 0.15s;
}
.ahcd-timeslot:hover { background: #1E3A5F; color: #fff; }
.ahcd-timeslot--selected { background: #C62828; border-color: #C62828; color: #fff; }
.ahcd-timeslot--booked { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

.ahcd-timeslots__empty {
  font-size: 13px;
  color: #BDBDBD;
}

/* ── No slots message ── */
.ahcd-no-slots {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: #BDBDBD;
}

/* ── Section divider ── */
.ahcd-divider {
  height: 1px;
  background: #BDBDBD;
  margin: 20px 0;
}

/* ── Loading ── */
.ahcd-loading {
  padding: 32px;
  text-align: center;
  font-size: 14px;
  color: #4A4A4A;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .ahcd-modal__box { padding: 28px 20px 24px; }
  .ahcd-modal__title { font-size: 18px; }
  .ahcd-row { flex-direction: column; gap: 16px; }
  .ahcd-form-actions { justify-content: stretch; }
  .ahcd-btn { width: 100%; }
}
