/* Форма бронирования «Звёздный дом». Заменяет /css/travelline-style.css */

:root {
  --bk-yellow: #F5C518;
  --bk-yellow-dark: #E0B000;
  --bk-ink: #1E1E1E;
  --bk-muted: #8A8A8A;
  --bk-line: #D8D8D8;
  --bk-field-h: 58px;
}

/* ---------- панель ---------- */

.bk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  padding: 20px 22px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .2);
}

.bk-bar__title {
  margin-right: auto;
  padding-right: 10px;
}

.bk-bar__name {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--bk-ink);
  line-height: 1.15;
}

.bk-bar__note {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 13px;
  color: var(--bk-muted);
  margin-top: 4px;
}

/* ---------- поля ---------- */

.bk-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: var(--bk-field-h);
  min-width: 172px;
  margin: 0;
  padding: 0 44px 0 14px;
  border: 1px solid var(--bk-line);
  background: #fff;
  cursor: pointer;
}

.bk-field:hover { border-color: #BDBDBD; }
.bk-field:focus-within { border-color: var(--bk-yellow-dark); }

/* иконка справа */
.bk-field::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

.bk-field--date::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.7' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='1.5'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.bk-field--guests::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='3.8'/%3E%3Cpath d='M4.5 20.5c0-3.9 3.4-5.8 7.5-5.8s7.5 1.9 7.5 5.8'/%3E%3C/svg%3E");
}

.bk-field__label {
  display: block;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--bk-muted);
  line-height: 1.3;
  margin-bottom: 2px;
}

.bk-field__input {
  border: 0;
  padding: 0;
  width: 100%;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--bk-ink);
  background: transparent;
  outline: none;
  cursor: pointer;
  line-height: 1.2;
}

/* убираем браузерный значок календаря — кликается всё поле целиком */
.bk-field__input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.bk-field__input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

/* убираем стрелку у выпадающих списков */
select.bk-field__input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: auto;
  padding-right: 0;
}

select.bk-field__input::-ms-expand { display: none; }

.bk-guests {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.bk-guests__sep {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--bk-ink);
  margin-right: 5px;
}

/* ---------- кнопка ---------- */

.bk-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--bk-field-h);
  padding: 0 34px;
  border: 0;
  background: var(--bk-yellow);
  color: var(--bk-ink);
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s;
}

.bk-submit:hover,
.bk-submit:focus-visible { background: var(--bk-yellow-dark); }

.bk-submit:disabled { opacity: .55; cursor: default; }

.bk-submit--wide {
  width: 100%;
  height: 52px;
  margin-top: 6px;
}

/* ---------- модальное окно ---------- */

.bk-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  overflow-y: auto;
}

.bk-modal[hidden] { display: none; }

.bk-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.bk-modal__window {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 480px;
  padding: 34px 34px 30px;
  margin: auto;
}

.bk-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 30px;
  line-height: 1;
  color: var(--bk-muted);
  cursor: pointer;
}

.bk-modal__title {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--bk-ink);
}

.bk-modal__lead {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 14px;
  color: var(--bk-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.bk-row { display: flex; gap: 12px; }
.bk-row > .bk-input { flex: 1; }

.bk-input { display: block; margin-bottom: 14px; }

.bk-input > span {
  display: block;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 12px;
  color: var(--bk-muted);
  margin-bottom: 4px;
}

.bk-input input,
.bk-input textarea {
  width: 100%;
  border: 1px solid var(--bk-line);
  padding: 11px 12px;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  color: var(--bk-ink);
  background: #fff;
}

.bk-input input:focus,
.bk-input textarea:focus {
  outline: none;
  border-color: var(--bk-yellow-dark);
}

.bk-input textarea { resize: vertical; }

.bk-input input.is-invalid { border-color: #D24A44; }

.bk-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 13px;
  color: var(--bk-muted);
  line-height: 1.4;
  margin: 4px 0 14px;
  cursor: pointer;
}

.bk-consent.is-invalid { color: #D24A44; }
.bk-consent input { margin-top: 2px; }

.bk-error {
  background: #FDECEA;
  color: #B3352F;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 13px;
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.4;
}

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

/* ---------- экран после отправки ---------- */

.bk-done { text-align: center; padding: 10px 0; }

.bk-done__mark {
  width: 54px;
  height: 54px;
  line-height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bk-yellow);
  color: var(--bk-ink);
  font-size: 26px;
}

.bk-done h4 {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 21px;
  margin: 0 0 8px;
}

.bk-done p {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 14px;
  color: var(--bk-muted);
  line-height: 1.5;
}

.bk-done a { color: var(--bk-ink); font-weight: 700; }

/* ---------- планшеты ---------- */

@media (max-width: 1199px) {
  .bk-bar__title { width: 100%; margin-bottom: 4px; }
  .bk-field { flex: 1 1 200px; }
}

/* ---------- телефоны ---------- */

@media (max-width: 767px) {
  .bk-bar { padding: 18px 16px; gap: 10px; }
  .bk-bar__name { font-size: 22px; }
  .bk-field { flex: 1 1 100%; height: 54px; min-width: 0; }
  .bk-submit { width: 100%; height: 54px; }
  .bk-modal__window { padding: 28px 20px 24px; }
  .bk-row { flex-direction: column; gap: 0; }
}

/* ---------- кнопка «Забронировать» в карточках номеров ---------- */

.tl-button,
.bk-room-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 40px;
  margin-top: 20px;
  background: var(--bk-yellow);
  color: var(--bk-ink);
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}

.tl-button:hover,
.tl-button:focus,
.bk-room-btn:hover,
.bk-room-btn:focus {
  background: var(--bk-yellow-dark);
  color: var(--bk-ink);
  text-decoration: none;
}

@media (max-width: 767px) {
  .tl-button,
  .bk-room-btn { width: 100%; padding: 0 20px; }
}
