/* =========================================================
   ПРОЕКТСТРОЙ — Работнически хотел
   Design reference: Figma "04 · Hotel" (1440 × 2338)
   Модалът за заявка няма кадър в Figma — направен е по
   правилата на останалите страници.
   ========================================================= */

.hotel {
  padding-top: var(--header-h);
  background: var(--c-cream);
}

.hotel__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 130px var(--gutter) 96px;
}

/* --- заглавие --- */
.hotel__eyebrow {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  text-indent: 3px;
  text-transform: uppercase;
  color: var(--c-red);
}

.hotel__title {
  margin-top: 12px;
  font-family: var(--f-cond);
  font-weight: 800;
  font-size: clamp(44px, 5.83vw, 84px);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--c-ink);
}

.hotel__lead {
  margin-top: 20px;
  max-width: 1120px;
  font-size: clamp(17px, 1.32vw, 19px);
  line-height: 1.65;
  color: var(--c-muted);
}

/* --- голямата снимка --- */
.hotel__hero {
  margin: 36px 0 0;
  height: clamp(200px, 26.4vw, 380px);
  border-radius: 16px;
  overflow: hidden;
}
.hotel__hero img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   ТЪРСЕНЕ
   ========================================================= */
.search {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 24px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--c-card-border);
  border-radius: 16px;
}

.search__field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search__label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--c-placeholder);
}

.search__input {
  width: 100%;
  height: 48px;
  padding: 13px 14px;
  background: var(--c-cream);
  border: 1px solid var(--c-field-border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--c-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search__input:focus {
  outline: none;
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px rgba(241, 17, 18, 0.12);
}
.search__input--select { appearance: none; cursor: pointer; }

.search__btn {
  flex: 0 0 auto;
  height: 49px;
  padding: 0 32px;
  border: 0;
  border-radius: 10px;
  background: var(--c-red);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.search__btn:hover { background: #d80e0f; transform: translateY(-2px); }

/* --- редът с наличността --- */
.hotel__status {
  margin-top: 24px;
  font-weight: 700;
  font-size: 16px;
  color: var(--c-red);
}
.hotel__status--none { color: var(--c-muted); }

/* =========================================================
   СТАИ
   ========================================================= */
.rooms {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.room {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--c-card-border);
  border-radius: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.room:hover { border-color: #d9d3c9; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07); }
.room[hidden] { display: none; }

.room__media {
  flex: 0 0 auto;
  width: 280px;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
}
.room__media img { width: 100%; height: 100%; object-fit: cover; }

.room__info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.room__head { display: flex; flex-direction: column; gap: 6px; }

.room__title {
  font-family: var(--f-cond);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--c-ink);
}

.room__desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-muted);
}

.room__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.room__tags li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0ede6;
  font-weight: 600;
  font-size: 13px;
  color: var(--c-muted);
}

.room__side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-right: 8px;
  text-align: right;
}

.room__cap {
  font-weight: 600;
  font-size: 13px;
  color: var(--c-placeholder);
}

.room__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.room__price b {
  font-family: var(--f-cond);
  font-weight: 800;
  font-size: 34px;
  color: var(--c-ink);
}
.room__price span { font-size: 14px; color: var(--c-placeholder); }

.room__total {
  font-weight: 600;
  font-size: 13px;
  color: var(--c-ink);
  white-space: nowrap;
}
.room__total[hidden] { display: none; }

/* --- „Очаквайте скоро“ ---------------------------------
   Докато хотелът не е отворен, вместо цената в картата стои
   надпис. Ключът е един: data-hotel="soon" на <html> в
   hotel.html. Махне ли се, цените се връщат сами. */
.room__soon {
  display: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f0ede6;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  color: var(--c-eyebrow);
  white-space: nowrap;
}
[data-hotel="soon"] .room__price { display: none; }
[data-hotel="soon"] .room__soon { display: block; }

.room__btn {
  padding: 13px 28px;
  border: 0;
  border-radius: 8px;
  background: var(--c-red);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.room__btn:hover { background: #d80e0f; transform: translateY(-2px); }

.rooms__empty {
  margin-top: 18px;
  padding: 28px;
  background: #fff;
  border: 1px dashed var(--c-field-border);
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-muted);
}
.rooms__empty[hidden] { display: none; }

/* =========================================================
   МОДАЛ ЗА ЗАЯВКА
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: modal-fade 0.25s ease both;
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--c-cream);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  animation: modal-in 0.28s cubic-bezier(0.22, 0.61, 0.25, 1) both;
}

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal__view { padding: 28px; }
.modal__view[hidden] { display: none; }

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal__eyebrow {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--c-eyebrow);
}

.modal__title {
  margin-top: 6px;
  font-family: var(--f-cond);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--c-ink);
}

.modal__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--c-field-border);
  color: var(--c-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.modal__close:hover { background: var(--c-ink); color: #fff; }
.modal__close--float { position: absolute; top: 24px; right: 24px; }

.modal__summary {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f0ede6;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-muted);
}

.modal__form {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fieldset {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fieldset--narrow { flex: 0 0 96px; }
.fieldset > span {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--c-placeholder);
}
.fieldset > span i { font-style: normal; letter-spacing: 0; text-transform: none; }

/* styles.css дава на .field вътре в .field-row „flex: 1 1 0" — в колона
   това свива полето до нула, затова го връщаме на нормално */
.modal .fieldset .field { flex: 0 0 auto; }
.modal .field { height: 48px; }
.modal .field--area { height: auto; min-height: 88px; }
.field.is-bad { border-color: var(--c-red); background: #fdf3f3; }

.modal__error {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fdf3f3;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-red);
}
.modal__error[hidden] { display: none; }

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 4px;
}

.modal__price {
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-muted);
}
.modal__price b {
  display: block;
  font-family: var(--f-cond);
  font-weight: 800;
  font-size: 26px;
  color: var(--c-ink);
}

/* без обявена цена надписът е по-дълъг — смаляваме го, за да не бута бутона */
[data-hotel="soon"] .modal__price b { font-size: 18px; letter-spacing: 0.3px; }

.modal__submit { padding: 15px 30px; font-size: 16px; }

/* --- потвърждение --- */
.modal__view--done { position: relative; }

/* само в модала на хотела — останалите стилове за екрана
   с потвърждението са в styles.css */
.done__meta {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f0ede6;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-muted);
}



/* =========================================================
   ПО-ТЕСНИ ЕКРАНИ
   ========================================================= */
@media (max-width: 1080px) {
  .hotel__inner { padding-top: 96px; }

  .search { flex-wrap: wrap; }
  .search__field { flex: 1 1 200px; }
  .search__btn { flex: 1 1 100%; }

  .room { flex-wrap: wrap; }
  .room__media { width: 100%; height: clamp(190px, 34vw, 260px); }
  .room__info { flex: 1 1 100%; }
  .room__side {
    flex: 1 1 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-right: 0;
    text-align: left;
  }
  .room__cap { order: 1; }
  .room__price { order: 2; margin-right: auto; }
  .room__soon { order: 2; margin-right: auto; }
  .room__total { order: 3; }
  .room__btn { order: 4; }
}

@media (max-width: 640px) {
  .hotel__inner { padding: 72px 20px 56px; }
  .hotel__lead { margin-top: 14px; }
  .hotel__hero { margin-top: 26px; }
  .search { padding: 16px; gap: 12px; }
  .room { padding: 14px; gap: 16px; }
  .room__title { font-size: 24px; }
  .room__price b { font-size: 28px; }

  .modal { padding: 0; align-items: flex-end; }
  .modal__dialog {
    max-width: none;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
  .modal__view { padding: 22px 20px 26px; }
  .modal__title { font-size: 26px; }
  .field-row { flex-direction: column; }
  .fieldset--narrow { flex: 1 1 auto; }
  .modal__foot { flex-direction: column; align-items: stretch; }
  .modal__submit { width: 100%; }
}
/* =========================================================
   ПОЛЕ ЗА ДАТА + КАЛЕНДАР
   --------------------------------------------------------
   Вграденият календар на браузъра изглежда различно навсякъде
   и не се стилизира. Затова полето е бутон в стила на сайта,
   а самият календар се рисува от calendar.js.
   ========================================================= */
.dp { position: relative; }

.dp__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--c-ink);
}
.dp__btn:focus-visible,
.dp__btn.is-open {
  outline: none;
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px rgba(241, 17, 18, 0.12);
}

.dp__icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--c-placeholder);
}
.dp__btn.has-value .dp__icon,
.dp__btn.is-open .dp__icon { color: var(--c-red); }
.dp__icon svg { display: block; width: 100%; height: 100%; }

.dp__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dp__text.is-empty { color: var(--c-placeholder); }

/* --- самият календар --- */
.cal {
  position: fixed;
  z-index: 300;
  width: 306px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--c-card-border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(28, 25, 23, 0.18);
  animation: cal-in 0.16s ease-out both;
}
.cal[hidden] { display: none; }
.cal.is-still { animation: none; }

@keyframes cal-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cal__month {
  font-family: var(--f-cond);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--c-ink);
}

.cal__nav {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--c-card-border);
  border-radius: 9px;
  background: var(--c-cream);
  font-size: 19px;
  line-height: 1;
  color: var(--c-ink);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.cal__nav:hover:not(:disabled) {
  background: var(--c-red);
  border-color: var(--c-red);
  color: #fff;
}
.cal__nav:disabled { opacity: 0.35; cursor: default; }

.cal__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 14px;
}
.cal__week span {
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--c-placeholder);
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 6px;
}

.cal__day {
  position: relative;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-ink);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.cal__day:hover:not(:disabled) { background: #f1ece4; }
.cal__day:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: -2px;
}
.cal__day.is-out { color: #c3bdb4; }
.cal__day:disabled { color: #d5cfc6; cursor: default; }

/* днешният ден */
.cal__day.is-today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--c-red);
}

/* нощувките между настаняване и напускане */
.cal__day.is-range { background: #fbe9e9; color: var(--c-ink); }
.cal__day.is-start,
.cal__day.is-end { background: #f6dedd; }
.cal__day.is-end:hover { background: #f2d3d2; }

/* избраният ден */
.cal__day.is-sel,
.cal__day.is-sel:hover {
  background: var(--c-red);
  color: #fff;
}
.cal__day.is-sel.is-today::after { background: #fff; }

.cal__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--c-card-border);
}
.cal__link {
  border: 0;
  background: none;
  padding: 2px 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  color: var(--c-eyebrow);
  cursor: pointer;
}
.cal__link:hover { text-decoration: underline; }

/* =========================================================
   СЪГЛАСИЕ ЗА ОБРАБОТВАНЕ НА ДАННИ
   ========================================================= */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding-top: 2px;
  cursor: pointer;
}

.consent input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.consent__mark {
  flex: 0 0 auto;
  position: relative;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid var(--c-field-border);
  border-radius: 6px;
  background: var(--c-cream);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.consent__mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0.4);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.consent input:checked + .consent__mark {
  background: var(--c-red);
  border-color: var(--c-red);
}
.consent input:checked + .consent__mark::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}
.consent input:focus-visible + .consent__mark {
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px rgba(241, 17, 18, 0.12);
}

.consent__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-muted);
}
.consent__text a { color: var(--c-eyebrow); font-weight: 600; text-decoration: underline; }

.consent.is-bad .consent__mark { border-color: var(--c-red); background: #fdf3f3; }
.consent.is-bad .consent__text { color: var(--c-red); }

@media (prefers-reduced-motion: reduce) {
  .cal, .cal__day, .cal__nav, .consent__mark, .consent__mark::after { transition: none; animation: none; }
}

@media (max-width: 380px) {
  .cal { width: calc(100vw - 24px); }
}


/* =========================================================
   ПОП ЪП „ОЧАКВАЙТЕ СКОРО“
   Ползва рамката на модала за резервация; тук е само
   съдържанието вътре.
   ========================================================= */
.modal__dialog--narrow { max-width: 470px; }
.modal__dialog--narrow:focus { outline: none; }

.soon { text-align: center; padding: 14px 8px 6px; }

.soon__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 999px;
  background: #f0ede6;
  color: var(--c-eyebrow);
}
.soon__mark svg { width: 28px; height: 28px; }

.soon__eyebrow {
  margin-top: 18px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--c-eyebrow);
}

.soon__title {
  margin-top: 8px;
  font-family: var(--f-cond);
  font-weight: 800;
  font-size: 38px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--c-ink);
}

.soon__text {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-muted);
}

.soon__hint {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f0ede6;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-muted);
}
.soon__hint a { color: var(--c-red); font-weight: 700; }

.soon__btn { margin-top: 22px; width: 100%; padding: 15px; }

@media (max-width: 640px) {
  .soon__title { font-size: 32px; }
}
