:root {
  --bg: #f5f2ec;
  --surface: #fff;
  --soft: #f0ece5;
  --line: #ded6ca;
  --text: #26231f;
  --muted: #746d63;
  --brand: #0f766e;
  --brand-dark: #0a5751;
  --accent: #ffcf2e;
  --danger: #c6382f;
  --danger-soft: #ffe8e5;
  --success: #0f766e;
  --selected: #343434;
  --available: #f4faef;
  --shadow: 0 14px 40px rgba(44, 37, 29, 0.12);
  font-family: Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

body.is-embedded {
  min-height: auto;
  background: #fff;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.booking-module {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 42px;
}

body.is-embedded .booking-module {
  width: 100%;
  padding: 0;
}

body.is-embedded .module-header {
  display: none;
}

.module-header,
.search-bar,
.step-panel,
.success-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(44, 37, 29, 0.04);
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 18px 22px;
  border-radius: 8px;
}

.eyebrow,
.step-label {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.14;
}

.admin-link,
.secondary-button,
.primary-button,
.icon-button {
  min-height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  text-decoration: none;
}

.admin-link,
.secondary-button,
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.primary-button {
  border: 0;
  padding: 0 24px;
  background: var(--brand);
  color: #fff;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.secondary-button {
  padding: 0 18px;
}

.admin-link {
  padding: 0 18px;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) auto;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 8px;
}

.search-field {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.search-field span {
  color: var(--muted);
  font-size: 13px;
}

.search-field strong,
.search-field input {
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  min-height: 28px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
}

.step-panel,
.success-panel {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 8px;
}

.step-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.month-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 44px;
  padding: 0;
  font-size: 30px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.calendar-month h3 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 24px;
}

.weekdays,
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr));
}

.weekdays span {
  padding: 8px 4px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.weekdays span:nth-child(6),
.weekdays span:nth-child(7) {
  color: #e24b35;
}

.day-cell {
  position: relative;
  min-height: 76px;
  border: 1px solid #eee7dd;
  background: #fff;
  color: var(--text);
  display: grid;
  align-content: space-between;
  padding: 9px 8px 8px;
  text-align: left;
}

.day-cell.is-empty {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.day-cell.is-weekend {
  background: #faf7f1;
}

.day-cell.is-available {
  background: var(--available);
}

.day-cell.is-unavailable {
  background: var(--danger-soft);
  color: var(--danger);
}

.day-cell.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.day-cell.is-selected,
.day-cell.is-in-range {
  background: var(--selected);
  color: #fff;
}

.day-number {
  font-size: 25px;
  font-weight: 900;
}

.day-price {
  color: inherit;
  font-size: 13px;
  white-space: nowrap;
}

.day-note {
  font-size: 12px;
  font-weight: 800;
}

.selection-summary,
.selected-line {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 20px;
}

.selection-summary strong,
.selected-line strong {
  color: var(--text);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
}

.category-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 170px;
  background: var(--soft);
}

.category-photos img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.category-photos img:only-child {
  grid-column: 1 / -1;
}

.photo-fallback {
  grid-column: 1 / -1;
  min-height: 170px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.category-body {
  padding: 16px;
}

.category-body h3 {
  min-height: 58px;
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.18;
}

.category-meta {
  margin-bottom: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-price {
  margin-bottom: 14px;
  color: var(--danger);
  font-size: 28px;
  font-weight: 900;
}

.category-price small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.category-card .primary-button {
  width: 100%;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.guest-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

input {
  min-height: 48px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

.extras-field {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.promo-field {
  gap: 8px;
}

.promo-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.promo-message {
  min-height: 18px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.summary-row--discount {
  color: var(--brand);
}

.extras-field legend {
  padding: 0 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.extras-list {
  display: grid;
  gap: 10px;
}

.extra-choice {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: #faf8f4;
}

.extra-choice input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--brand);
}

.extra-choice span {
  display: grid;
  gap: 2px;
}

.extra-choice small,
.extras-empty {
  color: var(--muted);
  font-weight: 700;
}

.extra-choice.is-disabled {
  opacity: 0.55;
}

.extra-choice.is-disabled input {
  cursor: not-allowed;
}

.extras-empty {
  margin: 0;
}

.full {
  grid-column: 1 / -1;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.booking-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-head,
.summary-row {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

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

.summary-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-row strong:last-child {
  text-align: right;
}

.success-panel {
  display: grid;
  gap: 14px;
}

.success-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.success-code {
  font-size: 32px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .search-bar,
  .calendar-grid,
  .booking-layout,
  .guest-form {
    grid-template-columns: 1fr;
  }

  .weekdays,
  .days-grid {
    grid-template-columns: repeat(7, minmax(38px, 1fr));
  }

  .day-cell {
    min-height: 64px;
    padding: 7px 5px;
  }

  .day-number {
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .booking-module {
    width: min(100% - 18px, 1280px);
    padding-top: 9px;
  }

  .module-header,
  .step-heading {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 23px;
  }
}
