@charset "UTF-8";
:root {
  --black-m-color: #1c1c1c;
  --blue-m-color: #0a1389;
  --orange-m-color: #ff9f1c;
  --footer-m-text-color: #b4bbc2;
  --blue-light-color: #3643DE;
  --form-but-hover-color: rgba(0, 0, 205, 1);
  --grey-color: #EFEFEF;
  --light-grey: #b4bbc2;
  --ink: #1c1c1c;
  --muted: #545c70;
  --border: #d3d7e0;
  --ro: #f1f2f5;
  --bg: #f5f4f1;
  --navy: #1b2a8a;
  --orange: #f7941d;
  --blue: rgba(0, 0, 205, 1);
  --blue-hover: #3643DE;
  --peach: #fff1e3;
  --badge: #f9a43a;
  --error: #b42318;
  --error-bg: #fdecea;
}

.show-exchange-modal {
  cursor: pointer;
}

html.modal-open {
  overflow: hidden;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

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

/* ---------- Логотип (тимчасовий, замінити на оригінал) ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  width: 120px;
}
.logo img {
  width: 100%;
  height: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  min-height: 50px;
  padding: 12px 22px;
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-primary[disabled] {
  opacity: 0.75;
  cursor: progress;
}

.btn-block {
  width: 100%;
}

.btn .ic {
  width: 18px;
  height: 18px;
  flex: none;
}

.ic-wa {
  color: #25d366;
}

.ic-tg {
  color: #229ed9;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--black-m-color) !important;
  font-size: 14px;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 12px;
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.demo {
  max-width: 960px;
  margin: 0 auto 32px;
  padding: 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.demo summary {
  cursor: pointer;
  font-weight: 600;
}

.demo .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 10px;
}

.demo label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo select {
  font: inherit;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ---------- Попап ---------- */
dialog.booking {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  width: min(720px, 100% - 32px);
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: max(16px, 6vh) auto auto;
}

dialog.booking::backdrop {
  background: rgba(15, 21, 53, 0.55);
}

.bk {
  position: relative;
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 21, 53, 0.18);
}

.bk-body {
  padding: 28px 32px 22px;
}

.bk-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.bk-close {
  width: 40px;
  height: 40px;
  margin-right: -8px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bk-close:hover {
  background: var(--ro);
}

.bk h2.title {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bk .sub {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--black-m-color);
}

.field {
  margin-bottom: 16px;
  min-width: 0;
}

.field > label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.group {
  display: flex;
  border: 1px solid var(--black-m-color);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.group:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 63, 227, 0.18);
}

.group.invalid {
  border-color: var(--error);
}

.group input, .group output, .group select {
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 48px;
  padding: 0 14px;
  outline: none;
} /* скруглена лише рамка групи, як на макеті */
.group input, .group output {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.group output {
  background: var(--ro);
  color: #4a5166;
}

.group output.pending {
  font-size: 15px;
  color: var(--muted);
}

.group select {
  flex: none;
  width: 100px;
  border-left: 1px solid var(--black-m-color);
  cursor: pointer;
  padding-right: 32px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230f1535' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center/14px no-repeat;
}

.group select.code {
  width: 100px;
  border-left: 0;
  border-right: 1px solid var(--border);
  background-color: var(--ro);
}

.group input:focus-visible,
.group select:focus-visible {
  outline: none;
} /* фокус показує лише рамка групи */
.hint {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Рядок під полем: підказка або помилка в тому самому місці — форма не стрибає */
.slot {
  margin: 5px 0 0;
  min-height: 19px;
  font-size: 13px;
  line-height: 19px;
  color: var(--black-m-color);
}

.slot.is-err {
  color: var(--error);
  font-weight: 500;
}

#fix {
  font-size: 14px;
  line-height: 20px;
  min-height: 20px;
  color: var(--ink);
  padding-left: 5px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}

.calc-grid .field {
  margin-bottom: 8px;
}

.calc-grid .slot {
  min-height: 38px;
} /* у вузькій колонці помилка буває у 2 рядки — місце зарезервоване */
.calc-grid > .wide {
  grid-column: 1/-1;
}

.summary {
  margin: 0 0 18px;
}

.summary .hint {
  margin-top: 6px;
}

.plate {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--peach);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.badge {
  background: var(--badge);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
}

.badge.std {
  background: #e6e8ee;
}

.plate.is-err {
  background: var(--error-bg);
  color: #7a1a12;
}

.plate .link {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

#submit-msg .notice {
  margin: 12px 0 0;
}

.notice {
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 14px;
}

.notice p {
  margin: 0 0 8px;
}

.notice p:last-child {
  margin: 0;
}

.notice .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notice-error {
  background: var(--error-bg);
  color: #7a1a12;
}

.notice-warn {
  background: var(--peach);
  color: #6b3d00;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.legal {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--black-m-color);
}

.info {
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.info p {
  margin: 0 0 6px;
}

.info strong {
  color: var(--ink);
  font-weight: 600;
}

.info nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}

.info a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.info .ic {
  width: 16px;
  height: 16px;
}

/* ---------- Успіх ---------- */
#view-success:focus {
  outline: none;
}

.success p {
  margin: 0 0 4px;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--black-m-color);
  border-radius: 10px;
}

.facts dt {
  color: #4e4e4e;
}

.facts dd {
  margin: 0;
  font-weight: 600;
}
.facts dd .small-text-message {
  font-size: 14px;
}

.success h3 {
  margin: 16px 0 4px;
  font-size: 15px;
}

.success .alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.success .alt .btn {
  min-height: 42px;
  font-size: 15px;
  padding: 8px 16px;
}

.success .alt .ic {
  width: 20px;
  height: 20px;
}

@media (max-width: 600px) {
  dialog.booking {
    width: calc(100% - 24px);
    margin: 12px auto auto;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
  .bk {
    border-radius: 16px;
  }
  .bk-body {
    padding: 18px 18px 16px;
  }
  .bk-top {
    margin-bottom: 8px;
  }
  .bk .logo svg {
    width: 30px;
    height: 30px;
  }
  .bk .logo span {
    font-size: 21px;
  }
  .bk h2.title {
    font-size: 26px;
    line-height: 1.12;
  }
  .bk .sub {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .field {
    margin-bottom: 10px;
  }
  .field > label {
    margin-bottom: 5px;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .calc-grid .field {
    margin-bottom: 6px;
  }
  .calc-grid .slot, .slot {
    min-height: 19px;
  } /* резерв під підказку підганяє fitSlots() */
  .group input, .group output, .group select {
    font-size: 17px;
    min-height: 48px;
    padding: 0 12px;
  }
  .group select {
    width: 86px;
    padding-right: 30px;
    background-position: right 10px center;
  }
  .group select.code {
    width: 94px;
  }
  .summary {
    margin: 4px 0 12px;
  }
  .plate {
    width: 100%;
    justify-content: space-between;
    font-size: 15px;
    padding: 10px 14px;
  }
  #fix {
    font-size: 13px;
    line-height: 19px;
    min-height: 19px;
  }
  .btn-primary {
    font-size: 17px;
  }
  .legal {
    font-size: 12px;
    margin-top: 10px;
  }
  .success .alt .btn-primary {
    width: 100%;
  }
  .success .contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .success .contacts a:first-child {
    grid-column: 1/-1;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .facts dd {
    margin-bottom: 8px;
  }
}
@media (max-width: 400px) {
  .group input, .group output, .group select {
    min-height: 40px;
  }
  .bk h2.title {
    font-size: 20px;
  }
  .plate {
    min-height: 30px;
    padding: 5px 14px;
  }
  dialog.booking #phone-group input {
    min-height: 38px !important;
  }
  .facts dd {
    font-size: 14px;
  }
  .facts dt {
    font-size: 14px;
  }
  .success .alt {
    gap: 16px;
  }
  .success .alt .btn {
    min-height: 30px;
    font-size: 14px;
    padding: 2px 16px;
  }
  .success p {
    margin: 0 0 2px;
    font-size: 14px;
    line-height: 1.2;
  }
  .facts {
    padding: 6px 10px;
  }
  .success h3 {
    margin-top: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
}
dialog.booking #phone-group {
  overflow: visible;
}
dialog.booking #phone-group .iti {
  width: 100%;
}
dialog.booking #phone-group input {
  width: 100%;
  border-radius: 8px;
  min-height: 48px;
}
dialog.booking .iti__dropdown-content {
  max-width: min(360px, 100vw - 60px);
}
dialog.booking .iti__country-list {
  max-height: 220px;
}
dialog.booking .iti__search-input {
  width: 100%;
}
dialog.booking .iti .iti__selected-dial-code {
  font-size: 16px;
  color: #1c1c1c;
}
dialog.booking .iti__selected-country-primary {
  border-right: 1px solid var(--black-m-color);
}

.exchange-booking-reservation {
  color: var(--ink);
}
.exchange-booking-reservation .wrap-form-reservation {
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.exchange-booking-reservation .booking-inline {
  width: 100%;
  min-width: 0;
}
.exchange-booking-reservation .bk {
  box-shadow: none;
  overflow: visible;
}
.exchange-booking-reservation .bk-body {
  padding: 24px;
}
.exchange-booking-reservation .bk h2.title {
  text-align: left;
  text-transform: none;
}
.exchange-booking-reservation .booking-inline #phone-group {
  overflow: visible;
}
.exchange-booking-reservation .booking-inline #phone-group .iti {
  width: 100%;
}
.exchange-booking-reservation .booking-inline #phone-group input:not(.iti__search-input) {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  padding-left: 112px !important;
  color: var(--ink);
}
.exchange-booking-reservation .booking-inline .iti--allow-dropdown .iti__country-container {
  left: 0;
}
.exchange-booking-reservation .booking-inline .iti--inline-dropdown .iti__dropdown-content {
  left: 0;
  border-radius: 8px;
}
.exchange-booking-reservation .booking-inline .iti__dropdown-content {
  max-width: min(360px, 100vw - 60px);
}
.exchange-booking-reservation .booking-inline .iti__country-list {
  max-height: 220px;
}
.exchange-booking-reservation .booking-inline .iti__search-input {
  width: 100%;
}
.exchange-booking-reservation .booking-inline .iti .iti__selected-dial-code {
  font-size: 16px;
  color: var(--ink);
}
.exchange-booking-reservation .booking-inline .iti__selected-country-primary {
  border-right: 1px solid var(--border);
  padding-left: 14px;
  padding-right: 14px;
}
@media (max-width: 575px) {
  .exchange-booking-reservation .bk-body {
    padding: 20px 16px;
  }
  .exchange-booking-reservation .calc-grid {
    grid-template-columns: 1fr;
  }
}