/* com_emsercitas · formulario de citas. Usa los tokens de tpl_emser2026 (tokens.css). */
.em-citas { max-width: 860px; }
.em-citas__form { display: grid; gap: 22px; margin-top: 18px; }
.em-citas__legendnote { margin: 0; color: var(--em-ink-3, #4f6357); font-size: var(--em-fs-sm, .9375rem); }
.em-citas__step { border: 0; margin: 0; padding: clamp(16px, 3vw, 26px); background: var(--em-surface, #fff); border-radius: var(--em-radius, 16px); box-shadow: var(--em-shadow-xs); min-width: 0; }
.em-citas__steptitle { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin: 0 0 16px; padding: 0; font-family: var(--em-font-display); font-weight: 700; font-size: 1.25rem; color: var(--em-ink); }
.em-citas__steptitle + * { clear: both; }
.em-citas__num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--em-brand); color: #fff; font-family: var(--em-font-sans); font-size: 1rem; flex: none; }
.em-citas .em-field { margin-bottom: 16px; }
.em-citas .em-field input, .em-citas .em-field select, .em-citas .em-field textarea { width: 100%; max-width: 100%; color: var(--em-ink); }
.em-citas .em-field textarea { min-height: 96px; }
.em-citas__req { color: #a3311d; }
.em-citas__opt { font-weight: 500; color: var(--em-ink-3, #4f6357); font-size: .875rem; }
.em-citas__help { margin: 0; color: var(--em-ink-3, #4f6357); font-size: .9375rem; line-height: 1.45; }
.em-citas__error { margin: 2px 0 0; color: #a3311d; font-weight: 700; font-size: .9375rem; }
.em-citas .has-error input:not([type=radio]):not([type=checkbox]), .em-citas .has-error select, .em-citas .has-error textarea { border: 2px solid #a3311d; }
.em-citas__row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .em-citas__row { grid-template-columns: 1fr 1fr; } .em-citas__doctype { max-width: 100%; } }
.em-citas__sedes { border: 0; margin: 0; padding: 0; min-width: 0; }
.em-citas__sedes legend, .em-citas__slots legend { font-weight: 700; font-size: var(--em-fs-sm, .9375rem); padding: 0; margin-bottom: 8px; }
.em-citas__sede { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid #a9bbb1; border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.em-citas__sede:has(input:checked) { border: 2px solid var(--em-brand); background: var(--em-soft); }
.em-citas__sede input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--em-brand); }
.em-citas__sede strong { display: block; }
.em-citas__sedeinfo { display: block; color: var(--em-ink-3, #4f6357); font-size: .9375rem; }
.em-citas__slots { border: 0; margin: 0; padding: 0; min-width: 0; }
.em-citas__slotgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); margin-top: 10px; }
.em-slot { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 40px; min-height: 56px; border: 1px solid #a9bbb1; border-radius: 12px; background: #fff; cursor: pointer; }
.em-slot input { position: absolute; left: 12px; top: 14px; width: 20px; height: 20px; margin: 0; accent-color: var(--em-brand); }
.em-slot__time { font-weight: 800; color: var(--em-ink); }
.em-slot__free { font-size: .8125rem; color: var(--em-ink-3, #4f6357); }
.em-slot:has(input:checked) { border: 2px solid var(--em-brand); background: var(--em-soft); }
.em-slot:has(input:focus-visible) { outline: 3px solid var(--em-focus, #0d94a8); outline-offset: 2px; }
.em-slot.is-full { background: #eef2ef; cursor: not-allowed; border-style: dashed; }
.em-slot.is-full .em-slot__time { color: var(--em-ink-2); text-decoration: line-through; }
.em-slot.is-full .em-slot__free { color: var(--em-ink-2); }
.em-citas__refresh { margin: 0 0 12px; }
.js-em-citas .em-citas__refresh { display: none; }
.em-citas__empty { padding: 12px 14px; border-radius: 12px; background: #fff7e0; color: #4a3500; margin: 0; }
.em-citas__consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--em-soft); }
.em-citas__consent input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--em-brand); }
.em-citas__consent label { font-weight: 700; }
.em-citas__consent.has-error { outline: 2px solid #a3311d; }
.em-citas__hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.em-citas__actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.em-citas__errors { margin-top: 18px; padding: 16px 18px; border-radius: 14px; border-left: 6px solid #a3311d; background: #fff1ee; color: #5c1a0e; }
.em-citas__errors h2 { margin: 0 0 6px; font-size: 1.125rem; color: #5c1a0e; }
.em-citas__errors ul { margin: 0; padding-left: 20px; }
.em-citas__errors a { color: #5c1a0e; font-weight: 700; }
.em-citas__ok { margin-top: 18px; padding: 16px 18px; border-radius: 14px; border-left: 6px solid var(--em-brand); background: var(--em-soft); }
.em-citas__ok.is-cancel { border-left-color: var(--em-ink-2); background: #eef2ef; }
.em-citas__oktitle { margin: 0 0 4px; font-weight: 800; font-size: 1.125rem; }
.em-citas__ok p:last-child { margin-bottom: 0; }
.em-citas__card { margin-top: 18px; padding: clamp(16px, 3vw, 26px); background: var(--em-surface, #fff); border-radius: var(--em-radius, 16px); box-shadow: var(--em-shadow-xs); }
.em-citas__card h2 { margin-top: 0; font-size: 1.25rem; }
.em-citas__code { font-family: var(--em-font-mono); font-size: 1.125rem; letter-spacing: .04em; }
.em-citas__badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .875rem; background: #eef2ef; color: var(--em-ink); }
.em-citas__badge.is-confirmada { background: #d8f0e3; color: #03532f; }
.em-citas__badge.is-cancelada { background: #f6dcd6; color: #5c1a0e; }
.em-citas__btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.em-citas__other { margin-top: 26px; padding: 16px 18px; border-radius: 14px; background: var(--em-soft); }
.em-citas__other h2 { margin: 0 0 6px; font-size: 1.0625rem; }
.em-citas__other p { margin: 0; }
.em-citas__off { margin-top: 18px; padding: 18px; border-radius: 14px; background: #fff7e0; }
/* Alto contraste del panel de accesibilidad */
html[data-em-contrast=high] .em-slot, html[data-em-contrast=high] .em-citas__sede, html[data-em-contrast=high] .em-citas__step,
html[data-em-contrast=high] .em-citas__card { background: #000; color: #fff; border-color: #fff; }
html[data-em-contrast=high] .em-slot__time, html[data-em-contrast=high] .em-slot__free, html[data-em-contrast=high] .em-citas__help,
html[data-em-contrast=high] .em-citas__sedeinfo, html[data-em-contrast=high] .em-citas__steptitle { color: #fff; }
@media (prefers-reduced-motion: reduce) { .em-citas * { transition: none !important; } }
