@font-face {
  font-family: "Open Sans";
  src: local("Open Sans");
  font-display: swap;
}

:root {
  --navy: #00003f;
  --bar: #202867;
  --ground: #f8f8fb;
  --surface: #fff;
  --muted: #5e6077;
  --placeholder: #c8c8cd;
  --ink: #191938;
  --border: #e4e5ec;
  --control: #c9cad5;
  --violet: #644aff;
  --link: #4534bf;
  --tint: #f0edff;
  --negative: #a52620;
  --negative-bg: #fff0ef;
  --positive: #176b45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 1rem/1.55 "Open Sans", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
select,
input {
  touch-action: manipulation;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 48px;
  background: var(--bar);
  color: white;
}

.wordmark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 104px;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.service-name {
  font-size: 1rem;
  font-weight: 600;
}

.language-label {
  margin-left: auto;
}

#language {
  padding: 8px 22px 8px 8px;
  background: transparent;
  color: white;
  border: 0;
  font-size: 1rem;
  cursor: pointer;
}

#language option {
  color: var(--navy);
  background: white;
}

.page {
  max-width: 960px;
  margin: 32px auto 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--navy);
  font-size: 2rem;
  line-height: 1.4;
  font-weight: 700;
}

h2 {
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: 8px;
}

.intro {
  font-size: 1rem;
  color: var(--muted);
  margin: 4px 0 22px;
}

.policy {
  background: #f5f4fa;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 22px;
  min-height: 170px;
}

.policy h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.policy p {
  font-size: 1rem;
  margin-bottom: 5px;
}

.policy-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 18px;
}

.workflow {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 316px);
  gap: 24px;
  align-items: start;
}

.main-column,
.side-column {
  min-width: 0;
}

.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
}

.micro {
  font-size: 0.875rem;
  line-height: 1.5;
}

.ticket-lookup-checked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lookup-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 16px 0 12px;
  align-items: end;
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
}

input {
  width: 100%;
  min-width: 0;
  height: 3rem;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: white;
  padding: 9px 12px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}

input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

input[readonly] {
  background: var(--ground);
}

#city {
  cursor: default;
}

#city:focus-visible {
  outline: none;
}

input[aria-invalid="true"] {
  border-color: var(--negative);
}

.primary {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: white;
  border-radius: 7px;
  min-height: 3rem;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 1rem;
}

#lookup-button,
.loading-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-button .button-spinner {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  border-color: rgb(255 255 255 / 45%);
  border-top-color: white;
}

.primary:hover:enabled {
  background: var(--bar);
}

.ticket-help {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}

#lookup-panel .micro {
  font-size: 0.875rem;
}

.validation {
  padding: 12px;
  background: var(--negative-bg);
  border: 1px solid #d9433c;
  border-radius: 8px;
  color: var(--negative);
  font-size: 1rem;
  margin: 12px 0;
  overflow-wrap: anywhere;
}

.limit-message {
  margin: 10px 0 10px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--link);
  border-radius: 6px;
  background: var(--tint);
  color: var(--navy);
  font-size: 0.875rem;
}

.field-error {
  color: var(--negative);
  font-size: 0.875rem;
  font-weight: 400;
}

.ticket-panel {
  min-height: 160px;
}

.secondary {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--link);
  border-radius: 8px;
  background: var(--surface);
  color: var(--link);
  font-weight: 600;
}

.add-tickets-toggle {
  width: 100%;
  margin-top: 20px;
}

.additional-ticket-search {
  display: grid;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
}

.additional-ticket-search p {
  margin: 0;
}

.additional-ticket-search .primary {
  min-height: 44px;
}

.search-ticket-rows {
  display: grid;
  gap: 16px;
}

.search-ticket-row {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.search-ticket-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: center;
}

.search-ticket-controls input,
.remove-search-row {
  min-height: 44px;
}

.search-ticket-controls input {
  font-size: 1rem;
}

.search-result {
  font-weight: 600;
}

.ticket-added {
  margin-left: 20px;
  color: var(--positive);
  font-weight: 600;
}

.positive {
  color: var(--positive);
  font-size: 1.25rem;
}

.ticket-list,
.summary ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.ticket-row:last-child {
  border-bottom: 0;
}

.ticket-event {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ticket-id-line {
  font-size: 0.875rem;
  color: var(--muted);
}

.ticket-amount {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  text-decoration: none;
  font-size: 1rem;
}

.text-button:hover {
  text-decoration: underline;
}

.remove-ticket {
  justify-self: end;
  min-height: 24px;
}

.methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border: 0;
  padding: 0;
  margin: 16px 0 12px;
}

.method {
  min-height: 96px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.method:has(:checked) {
  background: var(--tint);
  border-color: var(--violet);
}

.method:has(:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.method input {
  appearance: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  padding: 0;
  border-radius: 50%;
  margin: 1px 0 0;
}

.method input:checked {
  border: 6px solid var(--violet);
}

.method strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.method small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.875rem;
  margin-top: 14px;
}

.contact-panel {
  margin-top: 0;
}

.ticket-sections {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
}

.ticket-sections.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
}

.ticket-sections-content {
  min-height: 0;
  overflow: clip;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 22px;
}

.bank-fields {
  margin-top: 14px;
}

.address-grid {
  display: grid;
  grid-template-columns: 2.15fr 1fr 1fr;
  gap: 20px;
}

.bank-contact-grid {
  margin-top: 14px;
}

#iban-hint {
  margin-top: 20px;
  font-size: 0.875rem;
}

.summary {
  background: var(--tint);
  padding: 20px;
  min-height: 208px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.summary.has-more-below {
  box-shadow: inset 0 -16px 14px -16px rgb(0 0 63 / 55%);
}

.mobile-summary {
  display: none;
}

.summary h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.total {
  font-size: 1.75rem;
  color: var(--navy);
  line-height: 1.45;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-amount {
  display: grid;
  align-items: center;
  min-height: 44px;
}

.summary-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 0.875rem;
  line-height: 1.45;
}

.loading-spinner {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid #dcd8f2;
  border-top-color: var(--navy);
  border-radius: 50%;
}

.is-recalculating .ticket-amount,
.is-recalculating .summary-ticket-amount {
  opacity: 0.45;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .loading-spinner {
    animation: loading-spin 800ms linear infinite;
  }
}

.summary-event {
  border-top: 1px solid #dcd8f2;
  padding-top: 16px;
  margin-top: 16px;
}

.summary h3 {
  color: var(--link);
  font-size: 0.875rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.summary-event-title {
  margin: 0;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.summary-event-group + .summary-event-group {
  margin-top: 20px;
}

.summary-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.summary-method {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 10px;
}

#submit-panel {
  margin-top: 0;
}

#submit-content {
  display: flow-root;
}

#submit-panel.is-visible {
  margin-top: 20px;
}

.submit-button {
  width: 100%;
  min-height: 44px;
}

#submit-panel .micro {
  margin-top: 12px;
}

.help-panel {
  background: var(--tint);
  border-left: 4px solid var(--violet);
  border-radius: 3px 12px 12px 3px;
  padding: 16px;
  margin-top: 36px;
}

.help-panel h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.help-panel p {
  font-size: 1rem;
  margin: 12px 0 20px;
}

.help-panel a {
  font-size: 1rem;
  font-weight: 700;
}

.ticket-number {
  display: inline-block;
  max-width: 100%;
}

.ticket-number-button {
  background: none;
  border: 0;
  padding: 1px 2px;
  border-radius: 3px;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.ticket-tooltip {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 14px #00003f20;
}

footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  font-size: 0.875rem;
  margin: 56px 0 32px;
  color: var(--muted);
}

footer a {
  color: var(--muted);
}

.confirmation {
  max-width: 680px;
  margin: 64px auto;
  padding: 40px;
}

.confirmation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.confirmation-copy {
  flex: 1;
  min-width: 0;
}

.confirmation h1 {
  font-size: 2rem;
  margin: 0 0 12px;
}

.confirmation p {
  margin-top: 16px;
}

.confirmation-copy p {
  margin-top: 0;
}

.confirmation-mark {
  display: block;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  padding: 8px;
  border-radius: 50%;
  background: #e9f5ee;
}
.ticket-lookup-confirmation-mark {
  display: block;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 50%;
  background: #e9f5ee;
}

.receipt {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: var(--tint);
  padding: 20px;
  border-radius: 12px;
  margin-top: 24px;
}

.confirmation-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.guide {
  max-width: 680px;
}

.guide p {
  margin: 12px 0;
}

.help-page {
  max-width: 920px;
  padding-bottom: 40px;
}

.help-page > h1 {
  margin-bottom: 20px;
  text-transform: none;
}

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  background: var(--tint);
}

.help-section {
  scroll-margin-top: 20px;
}

.help-section h2 {
  color: var(--navy);
  margin-bottom: 16px;
  text-transform: none;
}

.help-section h3 {
  font-size: 1.25rem;
  margin: 8px 0;
}

.help-section ol,
.help-section ul {
  padding-left: 24px;
}

.help-section li {
  margin: 12px 0;
  line-height: 1.6;
}

.help-section li li {
  margin: 8px 0;
}

.ticket-examples {
  scroll-margin-top: 20px;
}

.ticket-example-image {
  display: block;
  width: auto;
  max-width: min(100%, 600px);
  height: auto;
  max-height: 600px;
  margin-top: 16px;
}

.help-back {
  margin: 20px 0;
}

@media (min-width: 761px) {
  .side-column {
    position: sticky;
    top: 24px;
    align-self: start;
  }

  .summary {
    min-height: min(13rem, calc(100dvh - 25rem));
    max-height: calc(100vh - 25rem);
    max-height: calc(100dvh - 25rem);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}

@media (max-width: 1040px) {
  .page {
    margin: 32px 32px 0;
  }
  .workflow {
    grid-template-columns: minmax(0, 1.95fr) minmax(260px, 1fr);
  }
  .methods {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .method {
    padding: 12px 8px;
  }

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

  .address-grid > label:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: var(--mobile-summary-offset, 0px);
  }

  body {
    font-size: 1rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .topbar {
    height: calc(64px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px)
      max(20px, env(safe-area-inset-right, 0px)) 0
      max(20px, env(safe-area-inset-left, 0px));
    gap: 24px;
  }

  .wordmark {
    width: 88px;
  }

  .service-name {
    font-size: 1rem;
  }

  #language {
    max-width: 95px;
    font-size: 1rem;
  }

  .page {
    margin: 24px max(16px, env(safe-area-inset-right, 0px)) 0
      max(16px, env(safe-area-inset-left, 0px));
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .intro {
    font-size: 1rem;
    margin: 8px 0 20px;
  }

  .policy-links {
    display: grid;
    gap: 12px;
  }

  .workflow {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .main-column,
  .side-column {
    display: contents;
  }

  #lookup-panel {
    order: 1;
  }

  #ticket-panel {
    order: 2;
  }

  #summary {
    order: 3;
    width: 100%;
    margin-bottom: 18px;
  }

  .mobile-summary {
    position: fixed;
    inset: 0 0 auto;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: calc(12px + env(safe-area-inset-top, 0px))
      max(20px, env(safe-area-inset-right, 0px)) 12px
      max(20px, env(safe-area-inset-left, 0px));
    background: var(--tint);
    border-bottom: 1px solid var(--border);
    color: var(--navy);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(calc(-100% - 16px));
  }

  .mobile-summary.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-summary::after {
    content: "";
    position: absolute;
    top: 100%;
    inset-inline: 0;
    height: 16px;
    background: rgb(240 237 255 / 55%);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    -webkit-mask-image: linear-gradient(black, transparent);
    mask-image: linear-gradient(black, transparent);
    pointer-events: none;
  }

  .mobile-summary h2 {
    font-size: 1rem;
    line-height: 1.4;
  }

  .mobile-summary-amount {
    flex-shrink: 0;
    max-width: 50%;
  }

  .total {
    font-size: 1.5rem;
  }

  .mobile-summary-total {
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .mobile-summary-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  #refund-form {
    order: 4;
    width: 100%;
  }

  #submit-panel,
  #submit-panel.is-visible {
    order: 5;
    width: 100%;
    margin-top: 0;
  }

  #help-panel {
    order: 6;
    width: 100%;
    margin-top: 24px;
  }

  .panel {
    padding: 16px;
    width: 100%;
  }

  .ticket-panel {
    min-height: 150px;
  }

  input {
    min-height: 44px;
    font-size: 1rem;
  }

  .primary {
    min-height: 44px;
  }

  .methods {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .method {
    min-height: 56px;
    align-items: flex-start;
    padding: 14px;
  }

  .method strong {
    font-size: 1rem;
  }

  .method small {
    margin-top: 4px;
    font-size: 0.875rem;
  }

  .contact-grid,
  .address-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contact-panel {
    min-height: 0;
    padding-bottom: 24px;
  }

  .iban-field {
    max-width: none;
  }

  .ticket-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }

  .ticket-event {
    font-size: 1rem;
  }

  .summary li {
    font-size: 0.875rem;
  }

  .summary h3 {
    font-size: 0.875rem;
  }

  .summary h2 {
    font-size: 1rem;
  }

  .confirmation {
    padding: 24px;
    margin: 32px auto;
  }

  .confirmation-header {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 16px;
  }

  .confirmation-mark {
    align-self: flex-end;
    width: 40px;
    height: 40px;
  }

  .confirmation h1 {
    font-size: 2rem;
  }

  .receipt {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .receipt strong {
    margin-bottom: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .mobile-summary {
    transition: transform 240ms cubic-bezier(0.2, 0, 0, 1), opacity 180ms ease,
      visibility 0s linear 240ms;
  }

  .mobile-summary.is-visible {
    transition-delay: 0s;
  }

  .ticket-sections {
    transition: grid-template-rows 280ms cubic-bezier(0.2, 0, 0, 1),
      opacity 200ms ease, visibility 280ms;
  }

  #submit-panel {
    transition: grid-template-rows 280ms cubic-bezier(0.2, 0, 0, 1),
      opacity 200ms ease, visibility 280ms, margin-top 280ms ease;
  }

  button,
  input,
  .method {
    transition: border-color 0.12s, background-color 0.12s;
  }
}
