/* Agendamiento de reuniones - Automatiza
 * Basado en reservas_page.png (dias en circulo, horas en pildora, boton ancho),
 * con los ajustes decididos: calendario mensual, seleccion en VERDE con marca
 * (el estado nunca depende solo del color) y leyenda simple.
 */
.aut-booking {
  --aut-brand: #1a7a90;
  --aut-brand-dark: #14606f;
  --aut-selected: #1e7b34;      /* verde; contraste 5,4:1 con texto blanco */
  --aut-ink: #252322;
  --aut-muted: #5b6366;
  --aut-line: #d9dcdd;
  --aut-soft: #f0f0f0;
  --aut-error: #b3261e;
  background: #ffffff;
  color: var(--aut-ink);
  font-family: 'DM Sans', sans-serif;
  padding: 2rem 5% 3rem;
}
.aut-booking *, .aut-booking *::before, .aut-booking *::after { box-sizing: border-box; }
.aut-bk-wrap { max-width: 1180px; margin: 0 auto; display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
/* Siempre dos columnas: seleccion a la izquierda, formulario a la derecha. */
@media (min-width: 992px) {
  .aut-bk-wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
}
.aut-booking h2 { font-size: 1.6rem; font-weight: 700; margin: 0 0 .35rem; }
.aut-booking h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .75rem; }
.aut-bk-tz { color: var(--aut-muted); margin: 0 0 1.25rem; font-size: .98rem; }

/* --- Mes --- */
.aut-bk-monthbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.aut-bk-month { font-size: 1.15rem; font-weight: 700; text-transform: capitalize; }
.aut-bk-nav {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--aut-line); background: #fff;
  font-size: 1.4rem; line-height: 1; color: var(--aut-ink); cursor: pointer;
}
.aut-bk-nav:hover:not(:disabled) { border-color: var(--aut-brand); color: var(--aut-brand); }
.aut-bk-nav:disabled { opacity: .35; cursor: default; }

.aut-bk-weekdays, .aut-bk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.aut-bk-weekdays { color: var(--aut-muted); font-size: .85rem; font-weight: 600; text-align: center; margin-bottom: .35rem; }
.aut-bk-grid { min-height: 17rem; align-content: start; }
.aut-bk-cell { display: flex; justify-content: center; }

.aut-bk-day {
  position: relative; width: 100%; max-width: 64px; aspect-ratio: 1 / 1; min-width: 44px; min-height: 44px;
  border-radius: 50%; border: 2px solid transparent; background: var(--aut-soft); color: var(--aut-ink);
  font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.aut-bk-day:hover:not(:disabled) { border-color: var(--aut-brand); }
.aut-bk-day:disabled { background: #fff; border-color: #ececec; color: #a9adaf; cursor: default; }
.aut-bk-day.is-none:disabled { text-decoration: line-through; }
/* Indicador de disponibilidad: forma + color (punto lleno / punto hueco). */
.aut-bk-mark { width: 7px; height: 7px; border-radius: 50%; margin-top: 4px; background: var(--aut-brand); }
.aut-bk-day.is-few .aut-bk-mark { background: transparent; border: 2px solid #b26a00; width: 9px; height: 9px; }
.aut-bk-day:disabled .aut-bk-mark { display: none; }
.aut-bk-day[aria-pressed="true"] { background: var(--aut-selected); color: #fff; border-color: var(--aut-selected); }
.aut-bk-day[aria-pressed="true"] .aut-bk-mark { display: none; }
.aut-bk-day[aria-pressed="true"]::after, .aut-bk-slot[aria-pressed="true"]::after { content: "\2713"; font-size: .8em; margin-top: 2px; }
.aut-bk-slot[aria-pressed="true"]::after { margin: 0 0 0 .45rem; }

/* Telefonos: 7 circulos de 44 px no caben con el margen del 5 %. */
@media (max-width: 420px) {
  .aut-booking { padding-left: 16px; padding-right: 16px; }
  .aut-bk-weekdays, .aut-bk-grid { gap: .2rem; }
  .aut-bk-panel { padding: 1.25rem 1rem; }
}
@media (max-width: 359px) { .aut-bk-day { min-width: 38px; min-height: 38px; } }

.aut-bk-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin: .9rem 0 0; padding: 0; list-style: none; color: var(--aut-muted); font-size: .88rem; }
.aut-bk-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.aut-bk-legend .aut-bk-mark { margin: 0; }
.aut-bk-legend .is-few { background: transparent; border: 2px solid #b26a00; width: 9px; height: 9px; }
.aut-bk-legend s { color: #a9adaf; }

.aut-bk-sep { border: 0; border-top: 1px solid var(--aut-line); margin: 1.5rem 0; }

/* --- Horas --- */
.aut-bk-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; min-height: 3.5rem; }
@media (max-width: 420px) { .aut-bk-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aut-bk-slot {
  min-height: 48px; border-radius: 999px; border: 2px solid transparent; background: var(--aut-soft); color: var(--aut-ink);
  font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
}
.aut-bk-slot:hover:not(:disabled) { border-color: var(--aut-brand); }
.aut-bk-slot:disabled { background: #fff; border-color: #ececec; color: #a9adaf; text-decoration: line-through; cursor: default; }
.aut-bk-slot[aria-pressed="true"] { background: var(--aut-selected); border-color: var(--aut-selected); color: #fff; }
.aut-bk-empty { grid-column: 1 / -1; color: var(--aut-muted); margin: .4rem 0; }

/* --- Botones --- */
.aut-bk-btn {
  display: block; width: 100%; max-width: 520px; margin: 1.5rem auto 0; min-height: 52px; border-radius: 10px; border: 0;
  background: var(--aut-brand); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer;
}
.aut-bk-btn:hover:not(:disabled) { background: var(--aut-brand-dark); }
.aut-bk-btn:disabled { background: #b9c4c7; cursor: default; }
.aut-bk-btn.is-loading { position: relative; color: transparent; }
.aut-bk-btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: aut-bk-spin .8s linear infinite;
}
@keyframes aut-bk-spin { to { transform: rotate(360deg); } }
.aut-bk-link { background: none; border: 0; padding: 0; color: var(--aut-brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.aut-bk-link:disabled { color: var(--aut-muted); text-decoration: none; cursor: default; }

/* Foco visible. El tema pinta TODO foco en rojo con !important; en un formulario
 * eso se confunde con un error, asi que dentro del modulo se usa azul. */
.aut-booking *:focus-visible { outline: 3px solid #0b57d0 !important; outline-offset: 2px !important; }

/* --- Panel derecho --- */
.aut-bk-panel { border: 1px solid var(--aut-line); border-radius: 14px; padding: 1.75rem; background: #fbfcfc; }
/* Hasta pulsar Continuar el formulario se ve, pero no se puede usar. */
.aut-bk-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.aut-bk-panel fieldset:disabled { opacity: .55; }
.aut-bk-panel fieldset:disabled input, .aut-bk-panel fieldset:disabled .aut-bk-btn { cursor: not-allowed; }
.aut-bk-panel fieldset:disabled input { background: #f1f3f3; }
.aut-bk-summary.is-empty { background: #f1f3f3; border-color: var(--aut-line); color: var(--aut-muted); }
.aut-bk-summary.is-empty strong { font-weight: 500; }
.aut-bk-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; padding: .85rem 1rem; border-radius: 10px; background: #e8f3ea; border: 1px solid #b9d9bf; margin-bottom: 1.25rem; }
.aut-bk-summary strong { font-weight: 700; }
.aut-bk-field { margin-bottom: 1rem; }
.aut-bk-field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.aut-bk-field .aut-bk-opt { color: var(--aut-muted); font-weight: 400; }
.aut-bk-field input {
  width: 100%; min-height: 48px; border-radius: 8px; border: 1px solid #9aa3a6; padding: .55rem .8rem; font: inherit; color: var(--aut-ink); background: #fff;
}
.aut-bk-field input[aria-invalid="true"] { border-color: var(--aut-error); border-width: 2px; }
.aut-bk-err { color: var(--aut-error); font-size: .9rem; margin: .3rem 0 0; min-height: 0; }
.aut-bk-err:empty { display: none; }
/* Casilla de aceptacion de politicas (mismo texto y enlaces que el formulario de contacto). */
.aut-bk-consent { margin: 1.1rem 0 0; }
.aut-bk-consent label { display: flex; align-items: flex-start; gap: .6rem; margin: 0; font-size: .92rem; line-height: 1.45; color: var(--aut-muted); cursor: pointer; }
.aut-bk-consent input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--aut-brand); cursor: pointer; }
.aut-bk-consent input[aria-invalid="true"] { outline: 2px solid var(--aut-error); outline-offset: 2px; }
.aut-bk-consent a { color: var(--aut-brand); text-decoration: underline; }
.aut-bk-panel fieldset:disabled .aut-bk-consent label, .aut-bk-panel fieldset:disabled .aut-bk-consent input { cursor: not-allowed; }
.aut-bk-note { color: var(--aut-muted); font-size: .9rem; line-height: 1.45; margin: 1rem 0 0; }
.aut-bk-note a { color: var(--aut-brand); }
.aut-bk-code input { letter-spacing: .45em; text-transform: uppercase; font-weight: 700; font-size: 1.35rem; text-align: center; font-variant-numeric: tabular-nums; }
.aut-bk-timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.aut-bk-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; color: var(--aut-muted); font-size: .95rem; }

.aut-bk-alert { border-radius: 10px; padding: .85rem 1rem; margin: 0 0 1.25rem; border: 1px solid; }
.aut-bk-alert.is-error { background: #fdecea; border-color: #f1b5b0; color: #7a1a14; }
.aut-bk-alert.is-info { background: #e8f1f4; border-color: #b6d3db; color: #0f4350; }

.aut-bk-receipt h2 { color: var(--aut-selected); }
.aut-bk-receipt dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 1rem 0 0; }
.aut-bk-receipt dt { color: var(--aut-muted); }
.aut-bk-receipt dd { margin: 0; font-weight: 700; }

.aut-bk-skeleton { background: linear-gradient(90deg, #eee 25%, #f7f7f7 37%, #eee 63%); background-size: 400% 100%; animation: aut-bk-shimmer 1.3s ease infinite; border-color: transparent !important; color: transparent !important; }
@keyframes aut-bk-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
  .aut-bk-skeleton, .aut-bk-btn.is-loading::after { animation: none; }
}
.aut-bk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.aut-booking [hidden] { display: none !important; }
