/* Design tokens, fonts, reset, body, links and headings live in
   global.css, loaded before this file. */

.er-header {
  background: var(--er-bg);
  border-bottom: 3px solid var(--er-orange);
}

/* Shared horizontal centering — the header and page content line up on the
   same left/right edges; each keeps its own vertical padding. */
.er-container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.er-header__inner {
  padding-top: 16px;
  padding-bottom: 16px;
}

.er-header__logo {
  display: inline-block;
}

.er-header__logo img {
  display: block;
  height: 32px;
  width: auto;
}

.er-page {
  padding-top: 32px;
  padding-bottom: 80px;
}

/* Shared white card surface — hero, info cards, and the registration
   section all use this same background/radius/shadow treatment. */
.er-card {
  max-width: 1060px;
  background: var(--er-bg);
  border-radius: var(--er-radius-lg);
  box-shadow: var(--er-shadow);
  overflow: hidden;
  margin: 0 auto 32px;
}

/* Hero */
.hero {
  display: flex;
  min-height: 280px;
}

.hero-content {
  flex: 1;
  padding: 36px 40px;
  min-width: 0;
}

.hero-visual {
  width: 48%;
  min-width: 300px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(138deg, #FF5F00 0%, #FF7C1A 55%, #FFB347 100%);
}

.hero-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
  pointer-events: none;
}

.hero-visual::after {
  content: '';
  position: absolute;
  left: 30px;
  bottom: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  pointer-events: none;
}

.hero-eye {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--er-orange-pale);
  color: var(--er-orange);
  padding: 4px 11px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 15px;
  color: var(--er-text);
  max-width: 490px;
  line-height: 1.55;
}

.hero-sub.hero-lead {
  font-weight: 700;
  font-size: 16px;
  color: var(--er-text);
  margin-bottom: 8px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hf {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: var(--er-orange-pale);
  color: var(--er-orange);
  padding: 5px 12px;
  border-radius: 20px;
}

.hero-cta {
  margin-top: 20px;
}

/* Info cards */
.info-cards-wrap {
  padding: 28px 32px 32px;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.info-card {
  background: var(--er-orange-pale);
  border-radius: 20px;
  padding: 28px;
  font-size: 14px;
  color: var(--er-text);
  line-height: 1.65;
}

.info-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--er-orange);
  margin-bottom: 8px;
}

.info-card:nth-child(1) {
  background: #FDF6EE;
}

.info-card:nth-child(2) {
  background: #FCE9F8;
}

.info-card:nth-child(3) {
  background: #ECF9F3;
}

@media (max-width: 760px) {
  .info-cards {
    grid-template-columns: 1fr;
  }
}

/* Notices */
.er-notice {
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid var(--er-border);
  background: var(--er-bg-subtle);
  color: var(--er-text-mid);
  font-size: 14px;
}

.er-notice--warning {
  border-color: var(--er-orange-border);
  background: var(--er-orange-pale);
  color: var(--er-text);
}

.er-notice--error {
  border-color: rgba(192, 57, 43, .3);
  background: var(--er-error-bg);
  color: var(--er-error);
}

/* All-slots-full callout — a distinct banner rather than a plain notice,
   matching the reference design's all-full-banner. */
.er-all-full-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  margin-bottom: 24px;
  background: #FFF8F0;
  border: 1.5px solid rgba(255, 95, 0, .25);
  border-left: 4px solid var(--er-orange);
  border-radius: 8px;
}

/* [hidden] and .er-all-full-banner both have (0,1,0) specificity, and this
   stylesheet loads after the UA stylesheet — without this, the banner's own
   `display: flex` would beat `[hidden] { display: none }` and show it
   unconditionally regardless of the hidden attribute. */
.er-all-full-banner[hidden] {
  display: none;
}

.er-all-full-banner__icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--er-orange);
}

.er-all-full-banner__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--er-text);
  margin: 0 0 4px;
}

.er-all-full-banner__body {
  font-size: 13px;
  color: var(--er-text-mid);
  line-height: 1.5;
  margin: 0;
}

/* Registration section — same card surface as the hero and info cards
   (via .er-card on the element), just its own internal padding. */
.er-registration {
  padding: 28px 32px 32px;
}

/* Cancellation — a standalone warning banner above its own detail card,
   matching the reference design's cancel-box + card pair. */
.er-cancel-warning {
  padding: 28px 32px;
  text-align: center;
  border: 2px solid var(--er-orange-border);
}

.er-cancel-warning__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--er-text);
  margin: 0 0 8px;
}

.er-cancel-warning__body {
  font-size: 14px;
  color: var(--er-text-mid);
  margin: 0;
}

.er-cancel-card {
  padding: 28px 32px 32px;
}

/* Invalid/already-used cancellation link — replaces the warning banner and
   detail card entirely, matching the reference design's minimal expired-link
   state (muted ring + X, no call to action). */
.er-cancel-invalid {
  padding: 52px 28px 44px;
  text-align: center;
}

.er-cancel-invalid__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--er-text-light);
  border-radius: 50%;
  color: var(--er-text-light);
}

.er-cancel-invalid__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--er-text);
  margin: 0;
}

/* Step progress bar — banded and bled to the card's full width, same as
   the reference design's stepbar strip. */
.er-stepbar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  margin: 0 -32px 28px;
  padding: 20px 32px;
  background: var(--er-bg-subtle);
  border-bottom: 1px solid var(--er-border-light);
}

.er-stepbar::before {
  content: '';
  position: absolute;
  top: 38px;
  left: var(--er-stepbar-line-l, calc(50% - 150px));
  right: var(--er-stepbar-line-r, calc(50% - 150px));
  height: 2px;
  background: var(--er-border);
  z-index: 0;
}

.er-stepbar::after {
  content: '';
  position: absolute;
  top: 38px;
  left: var(--er-stepbar-line-l, calc(50% - 150px));
  width: var(--er-stepbar-done-w, 0px);
  height: 2px;
  background: var(--er-success);
  z-index: 0;
  transition: width .3s;
}

.er-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 220px;
  position: relative;
  z-index: 1;
}

.er-step-node__n {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--er-bg-subtle);
  border: 2px solid var(--er-border);
  color: var(--er-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.er-step-node.is-active .er-step-node__n {
  background: var(--er-amber);
  border-color: var(--er-amber);
  color: var(--er-text);
}

.er-step-node.is-done .er-step-node__n {
  background: var(--er-success);
  border-color: var(--er-success);
  color: #fff;
  font-size: 0;
}

.er-step-node.is-done .er-step-node__n::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-left: 2.2px solid #fff;
  border-bottom: 2.2px solid #fff;
  transform: rotate(-45deg) translate(1px, -2px);
}

.er-step-node__l {
  font-size: .875em;
  font-weight: 400;
  text-align: center;
  line-height: 1.3;
}

.er-step-node.is-active .er-step-node__l {
  color: var(--er-text);
  font-weight: 700;
}

.er-step-node.is-done .er-step-node__l {
  color: var(--er-success);
}

/* Each step's own h3 title — bled to the card's full width with a divider
   below it, matching the "sec-hd" section-header pattern used for the
   registration title itself. */
.er-step h3,
.er-cancel-card h3 {
  margin: 0 -32px 20px;
  padding: 0 32px 14px;
  border-bottom: 1px solid var(--er-border-light);
}

/* Bold caption above a field group (e.g. "Miestas", "Konsultacijos
   laikas") — distinct from the step's own h3 title above it. */
.er-group-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--er-text);
  margin: 0 0 8px;
}

/* De-emphasized trailing note on a label, e.g. "(neprivaloma)" or
   "· Trunka 1 val." */
.er-hint {
  font-weight: 400;
  color: var(--er-text-light);
  font-size: 13px;
  margin-left: 4px;
}

/* City cards */
.er-cities {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.er-city {
  position: relative;
  border: 1.5px solid var(--er-border);
  border-radius: 8px;
  padding: 12px 6px 10px;
  text-align: center;
  cursor: pointer;
  background: var(--er-bg);
  color: var(--er-text);
  transition: border-color .14s, background .14s;
}

.er-city:hover:not(:disabled) {
  border-color: var(--er-orange-border);
  background: var(--er-orange-pale);
}

.er-city.is-selected {
  border-color: var(--er-orange);
  background: var(--er-orange-pale);
}

.er-city:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.er-city__pin {
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
  color: var(--er-text-light);
}

.er-city.is-selected .er-city__pin {
  color: var(--er-orange);
}

.er-city__name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--er-text);
}

.er-city.is-selected .er-city__name {
  color: var(--er-orange);
}

.er-city__address {
  display: block;
  font-size: 13px;
  color: var(--er-text-light);
  margin-top: 2px;
  line-height: 1.3;
}

.er-city__badge {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--er-text-light);
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
}

/* Slot buttons */
#er-slots-wrap {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--er-border-light);
}

.er-slots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.er-slot {
  border: 1px solid var(--er-border);
  border-radius: 8px;
  height: 58px;
  padding: 0 4px;
  background: var(--er-bg);
  text-align: center;
  cursor: pointer;
  color: var(--er-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.er-slot:hover:not(:disabled) {
  border-color: var(--er-orange);
}

.er-slot.is-selected {
  border-color: var(--er-orange);
  background: var(--er-orange-pale);
  color: var(--er-orange);
  font-weight: 700;
}

.er-slot:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.er-slot__time {
  display: block;
}

.er-slot__full {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--er-text-light);
}

/* Form fields */
.er-field {
  margin-bottom: 18px;
}

.er-fields-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.er-fields-2 > .er-field {
  margin-bottom: 0;
}

.er-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.er-field input[type="text"],
.er-field input[type="tel"],
.er-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--er-border);
  border-radius: 6px;
  color: var(--er-text);
  font-size: 15px;
  background-color: #fff;
}

.er-field input:focus,
.er-field textarea:focus {
  outline: 2px solid var(--er-orange);
  outline-offset: 1px;
}

.er-field textarea {
  resize: vertical;
}

.er-field.has-error input,
.er-field.has-error textarea,
.er-field.has-error .er-dropdown__trigger {
  border-color: var(--er-field-error);
}

/* Custom dropdown — a native <select>'s open popup can't be restyled
   cross-browser, so the trigger/panel are hand-built (ARIA listbox-button
   pattern) to match the other fields exactly, closed and open. */
.er-dropdown {
  position: relative;
}

.er-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--er-border);
  border-radius: 6px;
  color: var(--er-text);
  font-family: inherit;
  font-size: 15px;
  background-color: #fff;
  cursor: pointer;
  text-align: left;
}

.er-dropdown__trigger[data-placeholder="true"] {
  color: var(--er-text-light);
}

.er-dropdown__trigger:focus-visible {
  outline: 2px solid var(--er-orange);
  outline-offset: 1px;
}

.er-dropdown__chevron {
  flex: none;
  color: var(--er-text-mid);
  transition: transform .15s ease;
}

.er-dropdown__trigger[aria-expanded="true"] .er-dropdown__chevron {
  transform: rotate(180deg);
}

.er-dropdown__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--er-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.er-dropdown__option {
  padding: 12px 10px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--er-text);
  cursor: pointer;
}

.er-dropdown__option:hover,
.er-dropdown__option.is-active {
  background: var(--er-orange-pale);
}

.er-dropdown__option[aria-selected="true"] {
  font-weight: 700;
}

/* Touch targets stay >=44px tall on phones instead of the 12px/15px desktop
   padding, per WCAG 2.5.5/mobile a11y guidance. */
@media (max-width: 760px) {
  .er-dropdown__option {
    padding: 13px 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

.er-field__error {
  color: var(--er-field-error);
  font-size: 12px;
  margin: 6px 0 0;
}

.er-field__counter {
  color: var(--er-text-light);
  font-size: 12px;
  margin: 6px 0 0;
  text-align: right;
}

.er-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--er-border-light);
  border: 1px solid var(--er-border);
  border-radius: 8px;
}

.er-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--er-orange);
  cursor: pointer;
}

.er-consent label {
  font-size: 14px;
  font-weight: 400;
  color: var(--er-text-mid);
  line-height: 1.55;
  margin: 0;
}

.er-consent a {
  color: var(--er-orange);
}

.er-required-mark {
  color: var(--er-orange);
  margin-left: 2px;
}

.er-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Buttons */
.er-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.er-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: .75em 1.875em;
  border-radius: 25px;
  border: 1px solid transparent;
  font-family: 'SwedbankHeadlineBold', Arial, sans-serif;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.er-btn svg {
  flex-shrink: 0;
}

.er-btn--primary {
  background: var(--er-orange);
  color: #fff;
}

.er-btn--primary:hover:not(:disabled) {
  background: var(--er-orange-dim);
}

.er-btn--primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.er-btn--secondary {
  background: none;
  border-color: transparent;
  color: var(--er-teal);
  font-family: 'Roboto', Arial, "Helvetica Neue", sans-serif;
  padding: 0;
  border-radius: 0;
  transition: opacity .14s;
}

.er-btn--secondary:hover {
  background: none;
  border-color: transparent;
  opacity: .75;
}

/* Step 3's two review boxes — place/time info and participant info kept
   visually distinct, matching the reference design's primary/secondary
   summary blocks. */
.er-summary-box {
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 0 1.5em;
  word-break: break-word;
}

.er-summary-box--primary {
  background: #FDF6EE;
  border: 1px solid var(--er-orange-border);
}

.er-summary-box--secondary {
  background: var(--er-success-bg);
  border: 1px solid rgba(31, 122, 74, .15);
}

.er-summary-box__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--er-orange);
  margin: 0 0 1em;
}

.er-summary-row {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--er-text);
  margin: 0 0 .5em;
}

.er-summary-row:last-child {
  margin-bottom: 0;
}

.er-summary-row__label {
  color: var(--er-text-light);
  min-width: 120px;
  flex-shrink: 0;
  font-size: 13px;
}

.er-captcha {
  padding: 14px 16px;
  background: var(--er-bg-subtle);
  border: 1px solid var(--er-border);
  border-radius: 8px;
}

.er-captcha__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.er-captcha__challenge {
  font-size: 16px;
  font-weight: 700;
  color: var(--er-text);
  white-space: nowrap;
}

/* ID selector needed: .er-field input[type="text"] (0,2,1) otherwise beats
   a class-based rule here (0,1,1) and keeps the input at width:100%. */
#er-captcha-answer {
  width: 90px;
  flex-shrink: 0;
}

/* Confirmation screen */
.er-confirmation__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--er-border);
}

.er-confirmation__check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--er-success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.er-confirmation__header h2 {
  font-family: 'Roboto', Arial, "Helvetica Neue", sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: var(--er-success);
  margin: 0;
}

.er-confirmation__sub {
  font-size: 14px;
  color: var(--er-text);
  line-height: 1.55;
  margin: 0 0 20px;
}

.er-maps-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--er-text-light);
  margin-left: 6px;
}

.er-maps-icon:hover {
  color: var(--er-orange);
}

.er-calendar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.er-cal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 25px;
  border: 2px solid var(--er-orange);
  color: var(--er-orange);
  background: var(--er-bg);
  font-family: 'SwedbankHeadlineBold', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .14s, color .14s;
}

.er-cal-btn:hover {
  text-decoration: none;
  background: var(--er-orange);
  color: #fff;
}

.er-confirmation__info {
  border-top: 1px solid var(--er-border);
  border-bottom: 1px solid var(--er-border);
  padding: 1em 0;
  margin: .875em 0;
}

.er-confirmation__info p {
  font-size: 14px;
  margin: 0 0 8px;
}

.er-confirmation__info p:last-child {
  margin-bottom: 0;
}

.er-confirmation__info p strong {
  color: var(--er-text);
}

@media (max-width: 480px) {
  .er-actions {
    flex-direction: column-reverse;
  }

  .er-btn--primary {
    width: 100%;
  }

  .er-btn--secondary {
    margin-top: 8px;
    padding: 12px 0;
  }

  .er-calendar-buttons {
    flex-direction: column;
  }

  .er-cal-btn {
    width: 100%;
  }

  .er-summary-row__label {
    min-width: 80px;
    width: 80px;
  }
}

/* This block must stay after every rule it overrides (.hero, .er-cities,
   .er-slots, .er-fields-2) — media queries don't add specificity, so an
   unconditional rule declared later in the file would otherwise win over
   this one even while the media query matches. */
@media (max-width: 620px) {
  .hero {
    flex-direction: column;
    min-height: auto;
  }

  .hero-content {
    padding: 26px 22px;
  }

  .hero-eye {
    display: none;
  }

  .hero-visual {
    width: 100%;
    height: 340px;
    order: -1;
  }
}

/* Tablet: too narrow for the side-by-side hero to keep a decent crop of the
   square photo, too wide to need mobile's tighter treatment — stack it like
   mobile, just with more room since the card itself is wider here. */
@media (min-width: 621px) and (max-width: 1010px) {
  .hero {
    flex-direction: column;
    min-height: auto;
  }

  .hero-content {
    padding: 30px 34px;
  }

  .hero-sub {
    max-width: none;
  }

  .hero-visual {
    width: 100%;
    height: 400px;
    order: -1;
  }
}

@media (min-width: 621px) and (max-width: 970px) {
  .er-slots {
    grid-template-columns: repeat(4, 1fr);
  }

  .er-cities {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 2em;
  }
}

@media (max-width: 620px) {
  .er-cities {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 2em;
  }

  .er-slots {
    grid-template-columns: repeat(3, 1fr);
  }

  .er-fields-2 {
    grid-template-columns: 1fr;
  }
}
