/**
 * Booking Engine — Living Florence
 * Styles for the SmartPMS-powered inline booking flow.
 */

/* =========================================================================
   Search form
   ========================================================================= */
.lf-be-search {
  background: var(--color-cream, #FAF7F2);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}

.lf-be-search__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-heading, #1a1a1a);
}

.lf-be-search__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  align-items: end;
}

.lf-be-search__field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted, #6b6b6b);
  margin-bottom: 0.35rem;
}

.lf-be-search__field input,
.lf-be-search__field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d0c9be;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  transition: border-color 0.2s;
}

.lf-be-search__field input:focus,
.lf-be-search__field select:focus {
  border-color: var(--color-primary, #A24A2C);
  outline: none;
  box-shadow: 0 0 0 2px rgba(162, 74, 44, 0.12);
}

.lf-be-search__submit {
  display: flex;
  align-items: end;
}

.lf-be-search__submit .btn {
  width: 100%;
  white-space: nowrap;
}

/* =========================================================================
   Results
   ========================================================================= */
.lf-be-results {
  margin: 2rem 0;
}

.lf-be-property {
  background: #fff;
  border: 1px solid #e8e2d9;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.lf-be-property__header {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--color-cream, #FAF7F2);
  border-bottom: 1px solid #e8e2d9;
}

.lf-be-property__img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.lf-be-property__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lf-be-property__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  color: var(--color-heading, #1a1a1a);
}

.lf-be-property__type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary, #A24A2C);
  margin-bottom: 0.25rem;
}

.lf-be-property__addr {
  font-size: 0.85rem;
  color: var(--color-muted, #6b6b6b);
}

/* Room cards */
.lf-be-rooms {
  padding: 1rem 1.25rem;
}

.lf-be-room {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0ebe3;
}

.lf-be-room:last-child {
  border-bottom: none;
}

.lf-be-room__info {
  flex: 1;
}

.lf-be-room__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.15rem;
}

.lf-be-room__plan {
  font-size: 0.8rem;
  color: var(--color-muted, #6b6b6b);
}

.lf-be-room__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

.lf-be-room__meta span {
  background: #f5f0ea;
  padding: 0.15em 0.5em;
  border-radius: 3px;
}

.lf-be-room__breakfast {
  background: #d4edda !important;
  color: #155724;
}

.lf-be-room__refund {
  background: #d4edda !important;
  color: #155724;
}

.lf-be-room__nonrefund {
  background: #fff3cd !important;
  color: #856404;
}

.lf-be-room__urgency {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #c0392b;
  font-weight: 600;
}

.lf-be-room__price {
  text-align: right;
  flex-shrink: 0;
  min-width: 120px;
}

.lf-be-room__total {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-heading, #1a1a1a);
}

.lf-be-room__pernight {
  display: block;
  font-size: 0.78rem;
  color: var(--color-muted, #6b6b6b);
}

.lf-be-room__nights {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted, #6b6b6b);
}

.lf-be-room__book {
  margin-top: 0.5rem;
  margin-left: auto;
  white-space: nowrap;
}

.lf-be-room__none {
  padding: 1rem;
  text-align: center;
  color: var(--color-muted, #6b6b6b);
}

/* =========================================================================
   Booking form
   ========================================================================= */
.lf-be-booking-form {
  max-width: 640px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #e8e2d9;
  border-radius: 8px;
  padding: 2rem;
}

.lf-be-booking-summary {
  background: var(--color-cream, #FAF7F2);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.lf-be-booking-summary h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.lf-be-summary__property {
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.lf-be-summary__room,
.lf-be-summary__dates {
  font-size: 0.9rem;
  color: var(--color-muted, #6b6b6b);
  margin: 0 0 0.15rem;
}

.lf-be-summary__total {
  font-size: 1.2rem;
  margin: 0.5rem 0 0;
}

.lf-be-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lf-be-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted, #6b6b6b);
  margin-bottom: 0.35rem;
}

.lf-be-field input,
.lf-be-field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d0c9be;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
}

.lf-be-field input:focus,
.lf-be-field textarea:focus {
  border-color: var(--color-primary, #A24A2C);
  outline: none;
  box-shadow: 0 0 0 2px rgba(162, 74, 44, 0.12);
}

.lf-be-field--full {
  grid-column: 1 / -1;
}

.lf-be-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

/* =========================================================================
   Confirmation
   ========================================================================= */
.lf-be-confirmation {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 500px;
  margin: 2rem auto;
}

.lf-be-confirmation__icon {
  width: 64px;
  height: 64px;
  line-height: 64px;
  font-size: 2rem;
  background: #d4edda;
  color: #155724;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.lf-be-confirmation h2 {
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 0.5rem;
}

.lf-be-confirmation__details {
  background: var(--color-cream, #FAF7F2);
  border-radius: 6px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

/* =========================================================================
   Empty state + errors
   ========================================================================= */
.lf-be-empty,
.lf-be-error {
  text-align: center;
  padding: 2rem;
  background: var(--color-cream, #FAF7F2);
  border-radius: 8px;
  margin: 2rem 0;
}

.lf-be-error {
  background: #fdf0ef;
  border: 1px solid #f5c6cb;
}

/* =========================================================================
   Step indicator
   ========================================================================= */
.lf-be-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.lf-be-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-muted, #6b6b6b);
  padding: 0.5rem 1rem;
}

.lf-be-step::after {
  content: '→';
  margin-left: 0.5rem;
  color: #ccc;
}

.lf-be-step:last-child::after {
  display: none;
}

.lf-be-step.active {
  color: var(--color-primary, #A24A2C);
  font-weight: 600;
}

.lf-be-step.completed {
  color: #155724;
}

.lf-be-step__number {
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: #e8e2d9;
  font-weight: 600;
  font-size: 0.75rem;
}

.lf-be-step.active .lf-be-step__number {
  background: var(--color-primary, #A24A2C);
  color: #fff;
}

.lf-be-step.completed .lf-be-step__number {
  background: #28a745;
  color: #fff;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 768px) {
  .lf-be-search__fields {
    grid-template-columns: 1fr 1fr;
  }

  .lf-be-property__header {
    flex-direction: column;
  }

  .lf-be-property__img {
    width: 100%;
    height: 160px;
  }

  .lf-be-room {
    flex-direction: column;
    align-items: stretch;
  }

  .lf-be-room__price {
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }

  .lf-be-room__book {
    margin-left: 0;
    width: 100%;
  }

  .lf-be-fields {
    grid-template-columns: 1fr;
  }

  .lf-be-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .lf-be-search__fields {
    grid-template-columns: 1fr;
  }

  .lf-be-search {
    padding: 1.25rem;
  }
}
