:root {
  --iae: #1e22aa;
  --iae-dark: #151880;
  --cyan: #00aeef;
  --ink: #24304a;
  --muted: #5b6784;
  --line: #d7deea;
  --paper: #f3f6fb;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(30, 34, 170, 0.14);
  --font-title: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --control-h: 38px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 700;
}

.btn-primary {
  background: var(--iae);
  color: var(--white);
  border-radius: 999px;
  padding: 10px 16px;
}

.btn-primary {
  width: 100%;
  min-height: 48px;
  font-size: 0.95rem;
}

.btn-secondary {
  margin-top: 8px;
  background: var(--cyan);
  color: var(--white);
  border-radius: 999px;
  padding: 12px 20px;
}

.eyebrow {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 12px;
  font-size: 0.75rem;
}

h2,
h3 {
  font-family: var(--font-title);
  color: var(--iae);
  line-height: 1.15;
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.form-section {
  width: 100%;
  background: var(--paper);
  padding: 40px 0 56px;
}

.form-wrap {
  width: calc(100% - 64px);
  margin: 0 auto;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px 24px;
  scroll-margin-top: 96px;
}

.form-head {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.form-head h2 {
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
}

.form-intro {
  margin: 0 0 16px;
}

.form-intro,
.form-legal,
.form-success p {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-legal {
  margin: 8px 0 0;
  font-size: 0.78rem;
}

.field,
.fields .field {
  display: grid;
  gap: 4px;
  align-items: start;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-title);
  line-height: 1.3;
  color: var(--iae-dark);
}

.field-label,
.ejes .field-label {
  display: block;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-title);
  line-height: 1.3;
  color: var(--iae-dark);
}

.fields > .field.span-2 {
  grid-column: span 4;
}

.fields > .field.span-half {
  grid-column: span 3;
  gap: 10px;
}

.fields > .field.span-all {
  grid-column: 1 / -1;
}

.field-error {
  color: #b42318;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body);
}

.field-error[hidden] {
  display: none;
}

.has-error input,
.has-error input:not([type="checkbox"]):not([type="radio"]):focus,
.has-error input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.has-error .ss-trigger,
.has-error .ss-trigger:focus,
.has-error .ss-trigger:focus-visible,
.has-error .ss-trigger[aria-expanded="true"],
.has-error textarea,
.has-error textarea:focus,
.has-error textarea:focus-visible {
  border-color: #b42318;
  outline: 0;
  box-shadow: none;
}

.phone-row {
  display: flex;
  align-items: stretch;
  height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  box-sizing: border-box;
}

.phone-row:focus-within {
  border-color: var(--iae);
}

.has-error[data-field="telefono"] .phone-row,
.has-error[data-field="telefono"] .phone-row:focus-within {
  border-color: #b42318;
}

.has-error[data-field="telefono"] .ss-trigger,
.has-error[data-field="telefono"] .ss-trigger:focus,
.has-error[data-field="telefono"] .ss-trigger:focus-visible,
.has-error[data-field="telefono"] .ss-trigger[aria-expanded="true"],
.has-error[data-field="telefono"] input,
.has-error[data-field="telefono"] input:focus,
.has-error[data-field="telefono"] input:focus-visible {
  border-color: transparent;
}

.phone-row .ss {
  flex: 0 0 auto;
}

.phone-row .ss-trigger {
  width: auto;
  height: 100%;
  min-height: 0;
  gap: 8px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 10px 0 0 10px;
  background: var(--paper);
  padding: 0 10px 0 12px;
  font: 400 0.9rem var(--font-body);
  white-space: nowrap;
}

.phone-row .ss-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink);
  opacity: 0.55;
}

.phone-row input[type="tel"] {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0 10px 10px 0;
  box-shadow: none;
}

.phone-row input[type="tel"]:focus,
.phone-row input[type="tel"]:focus-visible {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.ss {
  position: relative;
}

.ss:has(.ss-panel:not([hidden])) {
  z-index: 90;
}

.ss-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--control-h);
  min-height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  text-align: left;
  padding: 0 12px;
  font: 400 0.9rem var(--font-body);
  line-height: 1.25;
  color: var(--ink);
  cursor: pointer;
  box-sizing: border-box;
}

.ss-trigger.is-placeholder,
.ss.is-disabled .ss-trigger {
  color: #9aa3b5;
  font-weight: 400;
}

.ss.is-disabled .ss-trigger {
  background: var(--white);
  cursor: not-allowed;
}

.ss-panel {
  position: absolute;
  z-index: 80;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
}

.ss-panel[hidden] {
  display: none;
}

.ss-search {
  margin-bottom: 6px;
  width: 100%;
  height: var(--control-h);
  min-height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: 400 0.9rem var(--font-body);
  line-height: 1.25;
  color: var(--ink);
  background: var(--white);
  outline: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.ss-search::-webkit-search-decoration,
.ss-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.ss-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow: auto;
}

.ss-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  font: 400 0.82rem var(--font-body);
  cursor: pointer;
  color: var(--ink);
}

.ss-option-label {
  flex: 1;
  min-width: 0;
}

.ss-list button:hover {
  background: var(--paper);
}

.ss-empty {
  padding: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.ss-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}

.ss-tags[hidden] {
  display: none;
}

.ss-multi .ss-trigger {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.ss-multi .ss-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  flex-wrap: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.ss-multi.is-expanded .ss-tags {
  height: auto;
  min-height: 38px;
  flex-wrap: wrap;
  padding: 6px 8px;
  overflow: visible;
}

.ss-multi.is-focused .ss-tags,
.ss-multi.ss.is-focused .ss-tags {
  border-color: var(--iae);
  outline: 0;
  box-shadow: none;
}

.ss-multi .ss-placeholder {
  color: #9aa3b5;
  font: 400 0.9rem var(--font-body);
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 120px;
  border: 0;
  background: #eef0ff;
  color: var(--iae);
  border-radius: 999px;
  padding: 3px 6px 3px 8px;
  font: 700 0.72rem var(--font-title);
  white-space: nowrap;
  line-height: 1.2;
}

.ss-multi.is-expanded .tag {
  max-width: none;
}

.tag-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-remove {
  border: 0;
  background: transparent;
  color: var(--iae);
  cursor: pointer;
  font: 700 0.9rem var(--font-title);
  line-height: 1;
  padding: 0 2px;
}

.tag-more {
  max-width: none;
  cursor: pointer;
}

.ejes {
  border: 0;
  padding: 0;
  margin: 0;
}

.ejes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eje,
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  font: 400 0.88rem var(--font-body);
  color: var(--ink);
  font-weight: 400;
  cursor: pointer;
}

.eje input[type="checkbox"],
.consent input[type="checkbox"],
.modalidad-options input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  position: relative;
}

.eje input[type="checkbox"]:checked,
.consent input[type="checkbox"]:checked,
.modalidad-options input[type="checkbox"]:checked {
  background-color: var(--iae);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.4 8.2 6.5 11.2 12.6 4.8' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  border-color: var(--iae);
}

.eje span:not(.modalidad-info-icon),
.consent span {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  padding-top: 0;
  transform: translateY(-1px);
}

.modalidad-info-icon {
  display: none;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 700 12px/1 var(--font-title);
  text-align: center;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

.incluye-tooltip {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 280px;
  max-width: 400px;
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  color: var(--ink);
}

.incluye-tooltip-title {
  margin: 0 0 8px;
  padding-bottom: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--iae-dark);
  border-bottom: 1px solid var(--line);
}

.incluye-tooltip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.incluye-tooltip-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.55;
}

.incluye-tooltip-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--iae);
}

@media (max-width: 1024px) {
  .modalidad-info-icon {
    display: inline-flex;
  }
}

.modalidad {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}

.field-hint {
  margin: 0;
  font: 400 0.78rem var(--font-body);
  color: var(--muted);
  line-height: 1.35;
}

.modalidad-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
}

.modalidad label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--paper);
  min-height: 38px;
  box-sizing: border-box;
  cursor: pointer;
}

.modalidad label .modalidad-option-text {
  display: block;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  margin: 0;
}

.modalidad-options .modalidad-info-icon {
  display: inline-flex;
  margin-left: 8px;
  margin-right: 0;
}

.asiento-qty {
  flex: 0 0 auto;
  margin-left: 8px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--white);
  border: 1px solid var(--iae);
  color: var(--iae);
  font: 700 0.68rem var(--font-title);
  line-height: 1;
  white-space: nowrap;
}

.asiento-qty[hidden] {
  display: none;
}

.sala {
  margin-top: 12px;
  padding: 10px 8px 2px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}

.sala-info {
  margin: 16px 0 0;
  text-align: center;
  cursor: pointer;
}

.sala-info p {
  margin: 0;
  font: 400 0.78rem var(--font-body);
  color: var(--ink);
  line-height: 1.4;
}

.sala-info p + p {
  margin-top: 4px;
}

.sala-info p:first-child {
  font: 700 0.72rem var(--font-title);
  color: var(--iae);
  letter-spacing: 0.03em;
}

.sala-info p:last-child {
  color: var(--muted);
  font-weight: 600;
}

.sala-escenario {
  width: 42%;
  height: 10px;
  margin: 0 auto 12px;
  padding: 0;
  border-radius: 0 0 12px 12px;
  background: var(--iae);
}

.sala-mapa {
  position: relative;
  width: 100%;
  aspect-ratio: 1.85 / 1;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.butaca {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border: 1px solid var(--iae);
  border-radius: 1px;
  background: var(--paper);
  box-sizing: border-box;
}

.sala-leyenda {
  margin: 4px 0 0;
  text-align: center;
  font: 600 0.68rem var(--font-title);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.modalidad label:has(input:checked) {
  border-color: var(--iae);
  background: #eef0ff;
  color: var(--iae);
  font-weight: 700;
}

.fields {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px 20px;
  align-items: start;
}

.fields > .field {
  grid-column: span 2;
  display: grid;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--iae-dark);
}

.fields > .field.span-2 {
  grid-column: span 4;
}

.fields > .field.span-half {
  grid-column: span 3;
  gap: 10px;
}

.fields > .field.span-all {
  grid-column: 1 / -1;
}

.form-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin-top: 28px;
}

.form-consents {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 10px;
}

.form-foot .consent {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: none;
  text-align: left;
  white-space: normal;
}

.form-foot .consent span {
  flex: 1;
  min-width: 0;
  white-space: normal;
}

.form-foot .btn-primary {
  width: auto;
  min-width: 200px;
  max-width: 100%;
  align-self: center;
  padding: 10px 32px;
}

.form-foot .btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="search"]),
select,
.ss-trigger {
  width: 100%;
  height: var(--control-h);
  min-height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: 400 0.9rem var(--font-body);
  line-height: 1.25;
  color: var(--ink);
  background: var(--white);
  box-sizing: border-box;
}

textarea {
  width: 100%;
  height: auto;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: 400 0.9rem var(--font-body);
  line-height: 1.4;
  color: var(--ink);
  background: var(--white);
  box-sizing: border-box;
  resize: vertical;
}

input::placeholder,
textarea::placeholder,
select:invalid {
  color: #9aa3b5;
  opacity: 1;
  font-weight: 400;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
input:not([type="checkbox"]):not([type="radio"]):focus-visible,
textarea:focus,
textarea:focus-visible,
.ss-trigger:focus,
.ss-trigger:focus-visible,
.ss-trigger[aria-expanded="true"],
.ss-search:focus,
.ss-search:focus-visible {
  border-color: var(--iae);
  outline: 0;
  box-shadow: none;
}

.phone-row input:not([type="checkbox"]):not([type="radio"]):not([type="search"]),
.phone-row input:not([type="checkbox"]):not([type="radio"]):not([type="search"]):focus,
.phone-row input:not([type="checkbox"]):not([type="radio"]):not([type="search"]):focus-visible {
  border: 0;
  border-radius: 0 10px 10px 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.phone-row .ss-trigger,
.phone-row .ss-trigger:focus,
.phone-row .ss-trigger:focus-visible,
.phone-row .ss-trigger[aria-expanded="true"] {
  border-radius: 10px 0 0 10px;
}

input.ss-search:not([type="checkbox"]):not([type="radio"]),
input.ss-search:not([type="checkbox"]):not([type="radio"]):focus,
input.ss-search:not([type="checkbox"]):not([type="radio"]):focus-visible {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  box-shadow: none;
}

input.ss-search:not([type="checkbox"]):not([type="radio"]):focus,
input.ss-search:not([type="checkbox"]):not([type="radio"]):focus-visible {
  border-color: var(--iae);
}

.form-success {
  text-align: center;
  padding: 24px 8px 8px;
}

.form-submit-error {
  margin: 0;
  text-align: center;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 600;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.inline-actions .btn-secondary {
  margin-top: 0;
}

.modal {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  border: 0;
  border-radius: 18px;
  padding: 32px;
  color: var(--ink);
  box-shadow: var(--shadow);
  position: relative;
}

.modal::backdrop {
  background: rgba(21, 24, 128, 0.55);
}

.modal h3 {
  font-size: 1.45rem;
}

.modal h4 {
  margin: 0 0 8px;
  color: var(--iae);
  font-family: var(--font-title);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-asientos {
  width: min(420px, calc(100% - 32px));
  position: fixed;
  margin: auto;
}

.asientos-field {
  display: grid;
  gap: 6px;
  margin: 16px 0 4px;
  font: 700 0.72rem var(--font-title);
  color: var(--iae-dark);
}

.asientos-field input {
  width: 100%;
  height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: 400 0.95rem var(--font-body);
  color: var(--ink);
}

.modal-asientos .inline-actions {
  justify-content: flex-end;
}

.modal-asientos .btn-primary {
  width: auto;
  min-width: 140px;
  padding: 10px 24px;
}

@media (max-width: 1024px) {
  .form-wrap {
    width: calc(100% - 32px);
  }

  .form-card {
    padding: 20px 16px;
  }

  .fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .fields > .field,
  .fields > .field.span-2,
  .fields > .field.span-half {
    grid-column: span 1;
  }

  .fields > .field.span-all,
  .fields > [data-field="industrias"] {
    grid-column: 1 / -1;
  }

  .form-foot .btn-primary {
    width: auto;
    align-self: center;
  }

  .ejes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .fields {
    grid-template-columns: 1fr;
  }

  .fields > .field,
  .fields > .field.span-2,
  .fields > .field.span-half,
  .fields > .field.span-all,
  .fields > [data-field="industrias"] {
    grid-column: auto;
  }
}
