/* Centros de Servicios: interfaz de reserva alineada con las referencias de UX. */
@font-face {
  font-family: "Isidora";
  src: url("assets/isidora.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "Isidora";
  src: url("assets/isidora_bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  --reference-blue: #006bb5;
  --reference-blue-dark: #005d9e;
  --reference-ink: #353535;
  --reference-muted: #6a6c71;
  --reference-line: #dfe3eb;
  --reference-background: #f5f6fb;
  --font: "Isidora", "Avenir Next", "Segoe UI", Arial, sans-serif;
}

html { scroll-behavior: auto; }

body {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  color: var(--reference-ink);
  background: var(--reference-background);
  line-height: 1.43;
}

.site-header {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  border-bottom: 1px solid #e2e5ec;
  background: #fff;
  box-shadow: 0 2px 5px rgba(38, 58, 83, .12);
  backdrop-filter: none;
}

.header-inner,
.footer-inner {
  width: min(calc(100% - 2rem), 1024px);
}

.site-header .header-inner {
  min-height: 60px;
  gap: 1rem;
}

.header-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 1rem;
}

.header-brand .brand-button { min-width: 0; flex: 0 0 auto; }
.header-brand .brand-button img { width: 142px; height: auto; }
.header-divider { width: 1px; height: 28px; flex: 0 0 1px; background: #bec4cc; }
.header-title { overflow: hidden; color: var(--reference-ink); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }

.header-exit {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  gap: .45rem;
  padding: .35rem .2rem;
  border: 0;
  color: var(--reference-ink);
  background: transparent;
  font-size: .82rem;
  font-weight: 400;
}

.header-exit:hover { color: var(--reference-blue-dark); }
.header-exit .icon { width: 17px; height: 17px; }

main { flex: 1 0 auto; min-height: 0; border: 0; }

.live-booking.page-shell {
  width: min(calc(100% - 2rem), 1024px);
  padding: 22px 0 28px;
}

.live-booking .workflow-header { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: 0; padding: 0; }
.live-booking .workflow-heading { max-width: none; }

.live-booking .progress-card {
  margin: 0 0 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.live-booking .progress-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 6px;
}

.live-booking .progress-item { display: block; min-width: 0; text-align: left; }
.live-booking .progress-item::after { display: none; }
.live-booking .progress-segment {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #d8dbe2;
}
.live-booking .progress-item.is-current .progress-segment,
.live-booking .progress-item.is-complete .progress-segment { background: #383838; }
.live-booking .progress-caption { margin: 0; color: #404044; font-size: .83rem; }
.live-booking .progress-caption strong { font-weight: 800; }

.live-booking .content-card {
  width: min(100%, 610px);
  margin: 0 auto;
  overflow: visible;
  border: 1px solid var(--reference-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 4px rgba(40, 57, 84, .13);
}

.live-booking .card-section { padding: 29px 31px 31px; }
.live-booking .content-card:has(.identity-form) .section-heading { display: flex; }
.live-booking .section-heading { margin: 0 0 15px; }
.live-booking .section-heading h2,
.live-booking .procedure-step h2 {
  margin: 0;
  color: var(--reference-ink);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.live-booking .section-heading p { margin: 5px 0 0; color: var(--reference-muted); font-size: .87rem; }

.live-booking .field label,
.live-booking .procedure-step label {
  color: var(--reference-ink);
  font-size: .82rem;
  font-weight: 600;
}

.live-booking .field input,
.live-booking .field select,
.live-booking .procedure-step select {
  min-height: 44px;
  padding: .5rem .72rem;
  border: 1px solid var(--reference-line);
  border-radius: 10px;
  color: var(--reference-ink);
  background: #fff;
  font-size: .9rem;
  box-shadow: none;
}
.live-booking .field input:focus,
.live-booking .field select:focus,
.live-booking .procedure-step select:focus { border-color: var(--reference-blue); box-shadow: 0 0 0 3px rgba(0, 107, 181, .11); }
.live-booking .field-hint { color: var(--reference-muted); font-size: .72rem; }
.live-booking .field-error:empty { display: none; }

.live-booking .identity-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 15px; }
.live-booking .identity-form .field { gap: 3px; }
.identity-document-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 15px; padding: 9px 12px; border-radius: 9px; background: #f6f7fb; font-size: .8rem; }
.identity-document-summary span { min-width: 0; overflow-wrap: anywhere; }
.identity-document-summary button,
.live-booking .text-action { padding: 2px 0; border: 0; color: var(--reference-blue); background: transparent; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.identity-document-summary button:hover,
.live-booking .text-action:hover { text-decoration: underline; }
.live-booking .field input[readonly] { border-color: #e4e7ed; color: #4e5760; background: #f5f6f9; cursor: default; }
.live-booking .consent-block { margin-top: 14px; }
.live-booking .checkbox-row { padding: .7rem .8rem; border-color: var(--reference-line); border-radius: 9px; background: #fafbfe; font-size: .79rem; }
.live-booking .checkbox-row input { accent-color: var(--reference-blue); }

.live-booking .form-actions {
  justify-content: space-between;
  gap: .8rem;
  margin-top: 19px;
  padding: 0;
  border: 0;
}
.live-booking .form-actions:has(> .button:only-child) { justify-content: flex-end; }
.live-booking .button { min-height: 43px; padding: .55rem 1.08rem; font-size: .92rem; font-weight: 700; }
.live-booking .button-primary,
.live-booking .button-yellow {
  border: 1px solid var(--reference-blue);
  border-radius: 999px;
  color: #fff;
  background: var(--reference-blue);
  box-shadow: none;
}
.live-booking .button-primary:hover:not(:disabled),
.live-booking .button-yellow:hover:not(:disabled) { border-color: var(--reference-blue-dark); background: var(--reference-blue-dark); box-shadow: 0 4px 12px rgba(0, 107, 181, .15); }
.live-booking .button-secondary { min-height: 40px; padding: .42rem .35rem; border: 0; border-radius: 0; color: var(--reference-blue); background: transparent; box-shadow: none; font-weight: 600; }
.live-booking .button-secondary:hover:not(:disabled) { color: var(--reference-blue-dark); background: transparent; box-shadow: none; text-decoration: underline; }

.attention-options { display: grid; gap: 10px; }
.attention-choice {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: .7rem;
  width: 100%;
  min-height: 61px;
  padding: .8rem 1rem;
  border: 1px solid var(--reference-line);
  border-radius: 10px;
  color: var(--reference-ink);
  background: #fff;
  text-align: left;
}
.attention-choice:hover { border-color: #a6cce7; }
.attention-choice.is-selected { background: #f6f7fb; }
.attention-choice > span:nth-child(2) { display: grid; gap: 5px; }
.attention-choice strong { font-size: .9rem; }
.attention-choice small { color: var(--reference-muted); font-size: .8rem; font-weight: 400; line-height: 1.35; }
.attention-radio { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #d4dbe3; border-radius: 50%; background: #fff; }
.attention-choice.is-selected .attention-radio { border: 7px solid var(--reference-blue); }
.attention-chevron { color: var(--reference-blue); font-size: 1.4rem; line-height: 1; }

.procedure-step { margin-top: 19px; }
.procedure-step h2 { margin-bottom: 4px; font-size: 1.3rem; }
.procedure-hint { margin: 0 0 12px; color: var(--reference-muted); font-size: .83rem; }
.procedure-groups { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 15px; }
.procedure-groups button { min-height: 34px; padding: .36rem .72rem; border: 1px solid var(--reference-line); border-radius: 999px; color: var(--reference-blue); background: #fff; font-size: .75rem; font-weight: 700; }
.procedure-groups button.is-selected { border-color: var(--reference-blue); color: #fff; background: var(--reference-blue); }
.procedure-step label { display: block; margin-bottom: 5px; }
.procedure-step select { display: block; width: 100%; }
.selected-tramites { margin-top: 11px; }
.selected-tramites > p { margin: 0 0 7px; color: var(--reference-muted); font-size: .75rem; }
.selected-tramites > p strong { color: var(--reference-ink); }
.selected-tramites ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.selected-tramites li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 7px; background: #f2f7fb; font-size: .75rem; }
.selected-tramites li span { min-width: 0; }
.selected-tramites li button { flex: 0 0 auto; padding: 2px 4px; border: 0; color: var(--reference-blue); background: transparent; font-size: .72rem; font-weight: 700; }
.selected-tramites li button:hover { text-decoration: underline; }
.selected-tramites li button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 2px; }
.remote-panel { margin-top: 14px; padding: 14px 15px; border: 1px solid var(--reference-line); border-radius: 10px; background: #fff; }
.remote-panel > p { margin: 0 0 10px; color: var(--reference-muted); font-size: .82rem; }
.remote-option { display: flex; align-items: flex-start; gap: 9px; margin-top: 9px; font-size: .76rem; }
.remote-option .icon { width: 19px; height: 19px; flex: 0 0 19px; color: #5b5e63; }
.remote-option > span { display: grid; gap: 1px; min-width: 0; }
.remote-option a { color: var(--reference-blue); font-size: .88rem; text-decoration: underline; overflow-wrap: anywhere; }

.live-booking .live-option-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: .8rem 0; }
.live-booking .choice-button { min-height: 56px; border: 1px solid var(--reference-line); border-radius: 10px; color: var(--reference-ink); background: #fff; box-shadow: none; }
.live-booking .choice-button.is-selected { border-color: var(--reference-blue); background: #f1f8fd; box-shadow: inset 0 0 0 1px var(--reference-blue); }
.live-booking .choice-button strong { color: var(--reference-ink); font-size: .91rem; }
.live-booking .choice-button span { color: var(--reference-muted); font-size: .75rem; }
.live-booking .tramite-current { margin: 0 0 10px; border-radius: 9px; background: #f6f7fb; }
.live-booking .info-panel { margin: 12px 0; padding: .7rem .8rem; border-radius: 8px; color: #285167; background: #e8f6fc; font-size: .78rem; }
.live-booking .live-subheading { margin: 14px 0 6px; font-size: 1rem; }

.reservation-panel,
.contact-panel,
.live-booking .calendar-save { margin: 0 0 15px; padding: 15px; border-radius: 10px; text-align: left; }
.reservation-panel { background: #f6f7fb; }
.contact-panel,
.live-booking .calendar-save { border: 1px solid var(--reference-line); background: #fff; }
.reservation-panel h3,
.contact-panel h3,
.live-booking .calendar-save h3 { margin: 0 0 10px; color: var(--reference-ink); font-size: 1.02rem; font-weight: 800; }
.reservation-panel .summary-list,
.contact-panel .summary-list { display: grid; gap: 9px; margin: 0; border: 0; border-radius: 0; background: transparent; }
.reservation-panel .summary-row,
.contact-panel .summary-row { display: block; padding: 0; border: 0; }
.reservation-panel .summary-row + .summary-row,
.contact-panel .summary-row + .summary-row { border: 0; }
.reservation-panel .summary-row dt,
.contact-panel .summary-row dt { color: var(--reference-muted); font-size: .72rem; font-weight: 400; }
.reservation-panel .summary-row dd,
.contact-panel .summary-row dd { color: var(--reference-ink); font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.phase-summary .summary-row dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; }
.phase-summary .summary-row dd button { margin-left: auto; padding: 0; border: 0; color: var(--reference-blue); background: transparent; font-size: .73rem; font-weight: 600; }
.phase-summary .summary-row dd button:hover { text-decoration: underline; }
.live-booking .privacy-recap { margin: 8px 0; font-size: .75rem; }

.phase-summary .card-section { padding-top: 21px; padding-bottom: 21px; }
.phase-summary.page-shell { padding-top: 12px; padding-bottom: 12px; }
.phase-summary .progress-card { margin-bottom: 17px; }
.phase-summary .section-heading { margin-bottom: 10px; }
.phase-summary .section-heading h2 { font-size: 1.35rem; }
.phase-summary .reservation-panel,
.phase-summary .contact-panel { margin-bottom: 9px; padding: 10px 13px; }
.phase-summary .reservation-panel h3,
.phase-summary .contact-panel h3 { margin-bottom: 7px; font-size: .92rem; }
.phase-summary .reservation-panel .summary-list { gap: 5px; }
.phase-summary .contact-panel .summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
.phase-summary .info-panel { margin: 7px 0; padding: .45rem .7rem; }
.phase-summary .form-actions { margin-top: 10px; }

.phase-confirmed .content-card { margin-top: 1px; }
.phase-confirmed .card-section { padding-top: 29px; }
.live-booking .success-view { max-width: none; padding: 0; text-align: left; }
.live-booking .success-mark { width: 66px; height: 66px; margin: 0 auto 17px; border: 3px solid #383838; color: #383838; background: #fff; box-shadow: none; }
.live-booking .success-mark .icon { width: 37px; height: 37px; }
.live-booking .success-view h2 { margin: 0 0 4px; color: var(--reference-ink); font-size: 1.55rem; line-height: 1.2; }
.live-booking .success-view > p { margin: 0 0 18px; color: var(--reference-muted); font-size: .88rem; }
.live-booking .calendar-save { margin-top: 0; }
.live-booking .calendar-save .calendar-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.live-booking .calendar-action { min-height: 36px; padding: 2px; border: 0; border-radius: 0; color: var(--reference-blue); background: transparent; font-size: .78rem; font-weight: 600; text-decoration: underline; }
.live-booking .calendar-action:hover { background: transparent; color: var(--reference-blue-dark); }
.live-booking .calendar-save p { color: var(--reference-muted); font-size: .72rem; }
.confirmation-note { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 16px; padding: 11px 12px; border: 1px solid #a9d5ed; border-radius: 8px; background: #e7f5fc; }
.confirmation-note .icon { width: 18px; height: 18px; flex: 0 0 18px; }
.confirmation-note p { margin: 0; font-size: .75rem; }
.phase-confirmed .form-actions { justify-content: center; }

@media (min-width: 721px) and (max-height: 800px) {
  .phase-tramite .procedure-step {
    max-height: calc(100svh - 320px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 6px;
  }
}

.site-footer { flex: 0 0 auto; border-top: 0; color: var(--reference-ink); background: #fff; }
.site-footer .footer-inner { min-height: 50px; flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem 0; }
.footer-vigilado { display: block; width: 152px; height: auto; }
.site-footer .footer-inner p { color: var(--reference-ink); font-size: .72rem; text-align: right; }

@media (max-width: 720px) {
  .site-header .header-inner { min-height: 58px; }
  .header-brand { gap: .6rem; }
  .header-brand .brand-button img { width: 115px; }
  .header-divider { height: 23px; }
  .header-title { font-size: .78rem; }
  .header-exit span { display: none; }
  .header-exit .icon { width: 21px; height: 21px; }
  .live-booking.page-shell { width: min(calc(100% - 1.5rem), 610px); padding: 14px 0 22px; }
  .live-booking .progress-card { margin-bottom: 14px; }
  .live-booking .progress-list { gap: 5px; }
  .live-booking .progress-caption { font-size: .76rem; }
  .live-booking .card-section { padding: 20px 17px 22px; }
  .live-booking .section-heading h2 { font-size: 1.35rem; }
  .live-booking .identity-form .form-grid { grid-template-columns: 1fr; gap: 11px; }
  .live-booking .form-actions { flex-direction: row; align-items: center; }
  .live-booking .form-actions .button { width: auto; }
  .live-booking .form-actions:has(> .button:only-child) .button { width: 100%; }
  .live-booking .live-option-grid { grid-template-columns: 1fr; }
  .attention-choice { padding: .7rem .75rem; }
  .site-footer .footer-inner { flex-wrap: wrap; min-height: 56px; gap: .3rem; }
  .site-footer .footer-inner p { font-size: .66rem; }
}

@media (max-width: 420px) {
  .header-title { max-width: 130px; }
  .live-booking .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .live-booking .form-actions .button { width: 100%; }
  .site-footer .footer-inner { justify-content: center; }
  .site-footer .footer-inner p { width: 100%; text-align: center; }
}
