/* Atlantis Reservas — usa los colores de la plantilla del Ayuntamiento si existen */
.com-atlantisreservas {
  --ar-accent: var(--t-red-bar, #dd0223);
  --ar-accent-text: var(--t-red-text, #b8001e);
  --ar-soft: var(--t-red-soft, #fde8eb);
  --ar-ink: var(--t-ink, #1f1a1a);
  --ar-ink-2: var(--t-ink-3, #6b6262);
  --ar-line: var(--t-line, #e8e2e2);
  --ar-bg-soft: var(--t-bg-soft, #f7f3f2);
  --ar-dark: #333333;
  --ar-free: #1d6b3f;
  --ar-free-bg: #e7f4ec;
  --ar-pista: var(--ar-accent);
  color: var(--ar-ink);
}
.com-atlantisreservas *, .com-atlantisreservas *::before, .com-atlantisreservas *::after { box-sizing: border-box; }
.ar-intro { margin-bottom: 20px; }
.ar-empty { padding: 20px; background: var(--ar-bg-soft); border-radius: 10px; }
.ar-help { margin: 0 0 14px; color: var(--ar-ink-2); font-size: 15px; }
.ar-back { margin-top: 24px; font-size: 15px; }
.ar-gestorbar { margin: 0 0 18px; }

/* Botones */
.ar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 2px solid transparent; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; }
.ar-btn:hover, .ar-btn:focus { text-decoration: none; }
.ar-btn--primary { background: var(--ar-accent); color: #fff; }
.ar-btn--primary:hover, .ar-btn--primary:focus { background: var(--ar-accent-text); color: #fff; }
.ar-btn--dark { background: var(--ar-dark); color: #fff; }
.ar-btn--dark:hover, .ar-btn--dark:focus { background: #111; color: #fff; }
.ar-btn--ghost { background: transparent; border-color: var(--ar-line); color: var(--ar-ink); }
.ar-btn--ghost:hover, .ar-btn--ghost:focus { border-color: var(--ar-ink-2); color: var(--ar-ink); }
.ar-btn--danger { background: #fff; border-color: var(--ar-accent); color: var(--ar-accent-text); }
.ar-btn--danger:hover, .ar-btn--danger:focus { background: var(--ar-accent); color: #fff; }
.ar-btn--lg { min-height: 54px; padding: 0 28px; font-size: 18px; }
.ar-btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.ar-btn[disabled] { opacity: .6; cursor: progress; }
.ar-link { padding: 0; border: 0; background: none; color: var(--ar-accent-text); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.ar-link--danger { color: var(--ar-accent-text); }

/* Lista de pistas */
.ar-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.ar-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ar-line); border-radius: 14px; background: #fff; border-top: 5px solid var(--ar-pista); }
.ar-card__img { aspect-ratio: 16 / 7; overflow: hidden; background: var(--ar-bg-soft); }
.ar-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-card__img--icon { display: flex; align-items: center; justify-content: center; color: var(--ar-pista); }
.ar-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.ar-card__kicker, .ar-summary__kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ar-accent-text); }
.ar-card__title { margin: 0; font-size: 22px; line-height: 1.25; }
.ar-card__desc { font-size: 15px; color: #4a4242; }
.ar-card__desc > :last-child { margin-bottom: 0; }
.ar-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; font-size: 14px; color: var(--ar-ink-2); }
.ar-card__meta span + span::before { content: "·"; margin-right: 14px; color: #b3a5a5; }
.ar-card .ar-btn { margin-top: auto; align-self: flex-start; }

/* Pestañas de pista y cabecera de semana */
.ar-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.ar-tab { padding: 10px 18px; border: 1px solid var(--ar-line); border-radius: 999px; color: var(--ar-ink); font-weight: 700; text-decoration: none; background: #fff; }
.ar-tab:hover, .ar-tab:focus { border-color: var(--ar-ink-2); text-decoration: none; color: var(--ar-ink); }
.ar-tab.is-active { background: var(--ar-dark); border-color: var(--ar-dark); color: #fff; }
.ar-cal__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 8px; }
.ar-cal__title { margin: 0; font-size: 24px; }
.ar-weeknav { display: flex; align-items: center; gap: 8px; }
.ar-weeknav__btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--ar-line); border-radius: 50%; font-size: 24px; line-height: 1; color: var(--ar-ink); text-decoration: none; background: #fff; }
.ar-weeknav__btn:hover, .ar-weeknav__btn:focus { border-color: var(--ar-ink); text-decoration: none; color: var(--ar-ink); }
.ar-weeknav__btn.is-disabled { opacity: .35; }
.ar-weeknav__label { min-width: 150px; text-align: center; font-weight: 700; }
.ar-datepick input { height: 42px; padding: 0 10px; border: 1px solid var(--ar-line); border-radius: 8px; font: inherit; }
.ar-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; color: var(--ar-ink-2); }
.ar-legend li { display: flex; align-items: center; gap: 6px; }
.ar-dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.ar-dot--free { background: var(--ar-free-bg); border: 2px solid var(--ar-free); }
.ar-dot--busy { background: #e6e1e1; }
.ar-dot--closed { background: repeating-linear-gradient(45deg, #eee, #eee 3px, #fff 3px, #fff 6px); border: 1px solid #ddd; }

/* Semana: 7 columnas en escritorio; en móvil, un día por pantalla con desplazamiento lateral */
.ar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ar-day { min-width: 0; border: 1px solid var(--ar-line); border-radius: 12px; background: #fff; overflow: hidden; }
.ar-day.is-today { border-color: var(--ar-pista); box-shadow: 0 0 0 1px var(--ar-pista); }
.ar-day__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 0; padding: 10px 10px 8px; background: var(--ar-bg-soft); font-size: 14px; font-weight: 400; border-bottom: 1px solid var(--ar-line); }
.ar-day__name { font-weight: 700; text-transform: capitalize; }
.ar-day__date { font-weight: 700; font-size: 20px; margin-left: auto; }
.ar-day__today { order: 5; width: 100%; font-size: 12px; font-weight: 700; color: var(--ar-accent-text); text-transform: uppercase; letter-spacing: .06em; }
.ar-day__free { order: 6; width: 100%; font-size: 12px; color: var(--ar-ink-2); }
.ar-day__closed { margin: 0; padding: 14px 10px; color: var(--ar-ink-2); font-size: 14px; }
.ar-slots { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 8px; list-style: none; }
.ar-slot { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.ar-slot__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.ar-slot__state { font-size: 12px; }
.ar-slot--free { background: var(--ar-free-bg); color: var(--ar-free); border: 1px solid #b9dcc6; }
.ar-slot--free:hover, .ar-slot--free:focus { background: var(--ar-free); color: #fff; text-decoration: none; }
.ar-slot--busy { background: #efebeb; color: #8a7f7f; }
.ar-slot--closed { background: repeating-linear-gradient(45deg, #f4f1f1, #f4f1f1 4px, #fff 4px, #fff 8px); color: #9a8f8f; }
.ar-slot--past, .ar-slot--later { color: #b3a8a8; }
.ar-slot--past .ar-slot__time, .ar-slot--later .ar-slot__time { font-weight: 400; }
@media (max-width: 1100px) and (min-width: 768px) {
  .ar-slot { flex-direction: column; align-items: flex-start; gap: 0; }
}
@media (max-width: 767px) {
  .ar-week { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .ar-day { flex: 0 0 86%; scroll-snap-align: start; }
  .ar-slots { display: grid; grid-template-columns: 1fr 1fr; }
  .ar-slot { min-height: 48px; }
  .ar-weeknav__label { min-width: 0; font-size: 15px; }
}

/* Vista «mes»: calendarios mensuales + horas del día elegido */
.ar-dot--partial { background: #fff1d6; border: 2px solid #c27c0e; }
.ar-dot--full { background: #fbe1e4; border: 2px solid var(--ar-accent); }
.ar-dot--sel { background: var(--ar-dark); }
.ar-cal--mes .ar-cal__head { justify-content: flex-start; }
.ar-cal__img { max-height: 64px; width: auto; border-radius: 8px; }
.ar-cal__id { display: flex; align-items: center; gap: 14px; }
.ar-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 0 0 22px; }
.ar-month { padding: 14px 14px 10px; border: 1px solid var(--ar-line); border-radius: 12px; background: #fff; }
.ar-month__title { margin: 0 0 8px; font-size: 17px; text-align: center; text-transform: capitalize; }
.ar-month__grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.ar-month__grid th { padding: 2px 0 4px; font-size: 12px; font-weight: 700; color: var(--ar-ink-2); text-align: center; }
.ar-month__grid th abbr { text-decoration: none; }
.ar-month__grid td { padding: 0; text-align: center; }
.ar-mday { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 7px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; border: 2px solid transparent; }
a.ar-mday:hover, a.ar-mday:focus { text-decoration: none; filter: brightness(.95); }
.ar-mday--free { background: var(--ar-free-bg); color: var(--ar-free); border-color: #9fd0b2; }
.ar-mday--partial { background: #fff1d6; color: #8a5600; border-color: #f0c77a; }
.ar-mday--full { background: #fbe1e4; color: var(--ar-accent-text); border-color: #f2b3bc; }
.ar-mday--closed, .ar-mday--out { color: #bdb3b3; font-weight: 400; }
.ar-mday.is-today { box-shadow: inset 0 -3px 0 var(--ar-ink); }
.ar-mday.is-selected { background: var(--ar-dark); border-color: var(--ar-dark); color: #fff; }
.ar-hours { padding: 20px 22px; border: 1px solid var(--ar-line); border-radius: 14px; background: var(--ar-bg-soft); scroll-margin-top: 90px; }
.ar-hours__title { margin: 0 0 4px; font-size: 21px; text-transform: none; }
.ar-hours__hint--after { margin: 14px 0 0 !important; font-size: 14px !important; }
.ar-hours__hint, .ar-hours__empty { margin: 0 0 12px; color: var(--ar-ink-2); font-size: 15px; }
.ar-hours__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.ar-hour { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 0 8px; border: 2px solid #9fd0b2; border-radius: 8px; background: #fff; color: var(--ar-free); font: inherit; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; text-decoration: none; cursor: pointer; }
.ar-hour:hover, .ar-hour:focus { background: var(--ar-free-bg); color: var(--ar-free); text-decoration: none; }
.ar-hour.is-selected { background: var(--ar-free); border-color: var(--ar-free); color: #fff; }
.ar-hour.is-busy { border-color: transparent; background: #ebe6e6; color: #a39999; text-decoration: line-through; cursor: not-allowed; }
.ar-hours__pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ar-line); }
.ar-hours__pick[hidden] { display: none; }
.ar-extend { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; padding: 12px 14px; border: 2px solid var(--ar-line); border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer; }
.ar-extend input { width: 22px; height: 22px; accent-color: var(--ar-free); }
.ar-extend.is-disabled { color: var(--ar-ink-2); font-weight: 400; cursor: default; }
.ar-hours__summary { flex: 1 1 260px; margin: 0; font-size: 17px; font-weight: 700; }
@media (max-width: 767px) {
  /* Un mes por pantalla, deslizando a los lados (se ve el borde del siguiente) */
  .ar-months { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .ar-month { flex: 0 0 88%; scroll-snap-align: start; }
  .ar-mday { height: 40px; }
  .ar-hours { padding: 16px; }
  .ar-hours__pick .ar-btn { width: 100%; }
}

/* Formulario de reserva */
.ar-summary { padding: 18px 22px; margin-bottom: 20px; border-radius: 14px; background: var(--ar-dark); color: #fff; border-left: 6px solid var(--ar-pista); }
.ar-summary .ar-summary__kicker { color: #ffb3bf; }
.ar-summary__title { margin: 2px 0 6px; font-size: 24px; color: #fff; }
.ar-summary__when { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 17px; }
.ar-summary__date::first-letter { text-transform: uppercase; }
.ar-summary__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.ar-form { max-width: 820px; }
.ar-fieldset { margin: 0 0 22px; padding: 0; border: 0; }
.ar-fieldset legend { margin-bottom: 10px; font-size: 18px; font-weight: 700; float: none; width: auto; }
.ar-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.ar-choice { position: relative; display: flex; flex-direction: column; min-width: 150px; padding: 12px 16px 12px 44px; border: 2px solid var(--ar-line); border-radius: 10px; cursor: pointer; background: #fff; }
.ar-choice input { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; accent-color: var(--ar-accent); }
.ar-choice:has(input:checked) { border-color: var(--ar-accent); background: var(--ar-soft); }
.ar-choice:has(input:focus-visible) { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.ar-choice.is-disabled { opacity: .5; cursor: not-allowed; }
.ar-choice__main { font-weight: 700; font-size: 17px; }
.ar-choice__sub { font-size: 14px; color: var(--ar-ink-2); }
.ar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.ar-field { display: flex; flex-direction: column; gap: 6px; }
.ar-field--full { grid-column: 1 / -1; }
.ar-field label { font-weight: 700; font-size: 15px; }
.ar-field input, .ar-field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #c9bfbf; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; color: var(--ar-ink); }
.ar-field input:focus, .ar-field textarea:focus { outline: 3px solid #1a5fb4; outline-offset: 1px; border-color: #1a5fb4; }
.ar-form.was-validated :invalid { border-color: var(--ar-accent); background: #fff7f8; }
.ar-hint { margin: 0; font-size: 13px; color: var(--ar-ink-2); }
.ar-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ar-legal { margin: 0 0 22px; padding: 16px 18px; border-radius: 10px; background: var(--ar-bg-soft); font-size: 14px; }
.ar-legal__info { margin: 0 0 12px; color: #4a4242; }
.ar-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.ar-check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ar-accent); }
.ar-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ar-alert { padding: 16px 18px; border-radius: 10px; margin-bottom: 18px; }
.ar-alert p { margin: 0 0 12px; }
.ar-alert--warn { background: #fff4e0; border: 1px solid #f0d199; }
.ar-alert--info { background: #e8eef9; border: 1px solid #c3d1ee; }
@media (max-width: 575px) {
  .ar-grid { grid-template-columns: 1fr; }
  .ar-choice { flex: 1 1 100%; }
  .ar-actions .ar-btn { width: 100%; }
}

/* Confirmación */
.ar-banner { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; padding: 16px 18px; border-radius: 12px; }
.ar-banner p { margin: 0; }
.ar-banner--ok { background: var(--ar-free-bg); color: #134a2b; border: 1px solid #b9dcc6; }
.ar-banner__title { font-weight: 700; font-size: 18px; }
.ar-ticket { max-width: 640px; padding: 22px; border: 1px solid var(--ar-line); border-radius: 14px; background: #fff; border-top: 6px solid var(--ar-pista); }
.ar-ticket.is-cancelled { opacity: .75; border-top-color: #999; }
.ar-ticket__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 14px; }
.ar-ticket__head .ar-summary__kicker { width: 100%; }
.ar-ticket__title { margin: 0; font-size: 24px; }
.ar-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.ar-badge--ok { background: var(--ar-free-bg); color: var(--ar-free); }
.ar-badge--off { background: #eee; color: #555; }
.ar-ticket__data { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 0 0 18px; }
.ar-ticket__data dt { font-size: 13px; color: var(--ar-ink-2); font-weight: 400; }
.ar-ticket__data dd { margin: 0; font-size: 17px; font-weight: 700; }
.ar-ticket__data dd::first-letter { text-transform: uppercase; }
.ar-cancel { max-width: 640px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ar-line); }
.ar-cancel h3 { margin: 0 0 6px; font-size: 18px; }
@media (max-width: 575px) { .ar-ticket__data { grid-template-columns: 1fr; } }

/* Agenda del personal */
.ar-agenda__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.ar-agenda__col { border: 1px solid var(--ar-line); border-radius: 12px; overflow: hidden; background: #fff; }
.ar-agenda__pista { margin: 0; padding: 12px 14px; font-size: 18px; background: var(--ar-dark); color: #fff; border-left: 6px solid var(--ar-pista); }
.ar-agenda__list { margin: 0; padding: 0; list-style: none; }
.ar-ag { display: flex; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--ar-line); }
.ar-ag:first-child { border-top: 0; }
.ar-ag__time { flex: 0 0 48px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ar-ag__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ar-ag__meta, .ar-ag__notes { font-size: 14px; color: var(--ar-ink-2); }
.ar-ag__notes { font-style: italic; }
.ar-ag__state { font-size: 14px; color: var(--ar-ink-2); }
.ar-ag__acts { display: flex; gap: 14px; align-items: center; }
.ar-ag__form { margin: 0; }
.ar-ag--busy { background: #fff7f8; }
.ar-ag--busy .ar-ag__time { color: var(--ar-accent-text); }
.ar-ag.is-cont { background: #fdf1f3; }
.ar-ag__cont { font-size: 13px; color: var(--ar-ink-2); }
.ar-ag--closed { background: repeating-linear-gradient(45deg, #f7f4f4, #f7f4f4 4px, #fff 4px, #fff 8px); }
.ar-ag--past .ar-ag__time { color: #b3a8a8; font-weight: 400; }
@media (max-width: 767px) {
  /* En móvil no se muestran los turnos ya pasados: menos desplazamiento */
  .ar-slots li:has(.ar-slot--past) { display: none; }
}

/* Cabecera del calendario: foto de la pista y salto a una fecha */
.ar-cal__id { display: flex; align-items: center; gap: 14px; }
.ar-cal__img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.ar-cal__head .ar-datepick { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ar-ink-2); }
.ar-cal__head .ar-datepick label { font-weight: 700; }
@media (max-width: 767px) { .ar-cal__head .ar-datepick { width: 100%; } .ar-cal__head .ar-datepick input { flex: 1; } .ar-cal__img { width: 56px; height: 56px; } }
.ar-cal__head .ar-datepick label { white-space: nowrap; }
