﻿/*
 * File: styles/css/booking.css
 * Project: avrora26
 * Role: Booking system styles (search widget, occupancy modal, house list, checkout/payment/confirmation pages)
 * Used in: booking_system/index.php, booking_system/booking.php, booking_system/booking_payment.php, booking_system/confirmation.php
 * Depends on: styles/css/menu.css, styles/css/footer.css (on booking_system/index.php). styles/css/style.css (on checkout/payment/confirmation)
 * Author: Team Avrora
 * Last updated: 14.02.2026
 */

:root {
  --avrora-accent: #ff6b6b;
  --avrora-green: #00a88e;
  --avrora-bg: #f0f5f0;
  --avrora-card: #ffffff;
  --avrora-text: #1f2a1f;
  --avrora-muted: #5b6b5b;
  --avrora-border: rgba(0,0,0,0.10);
  --avrora-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Base */
body.booking-system-page {
  margin: 0;
  background: var(--avrora-bg);
  color: var(--avrora-text);
  font-family: 'Roboto', sans-serif;
}

a { color: inherit; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--avrora-accent);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.button:hover {
  background: #ff5252;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255,107,107,0.25);
}

/* ======================= */
/* Search widget (booking_system/index.php) */
/* ======================= */
.search-widget {
  width: min(1100px, calc(100% - 32px));
  /* style.css defines .search-widget { max-width: 980px; } for the home page widget.
     booking_system/index.php must match the wider house cards list (1100px). */
  max-width: 1100px;
  margin: 10px auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;          /* keep one row on desktop (like index.php) */
  gap: 15px;
  justify-content: space-between;
}

.search-field {
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
}

.search-field label {
  font-weight: bold;
  margin-bottom: 5px;
}

.search-field input[type="text"],
.search-field input[type="date"],
.search-field select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  font-size: 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.search-field input:focus,
.search-field select:focus {
  outline: none;
  border-color: #00a88e;
  box-shadow: 0 0 5px rgba(39,174,96,0.5);
}

.occupancy-field { flex: 1 1 260px; }

.search-fields-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 15px;
}

.search-fields-wrapper .date-field {
  flex: none;
  max-width: 200px;
}

.date-field input[type="date"] {
  text-align: center;
}

.search-button {
  margin-left: auto;
  margin-top: 23px;
}

.search-button .button {
  background: #00a88e;
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.search-button .button:hover {
  background: #4eab9d;
  transform: scale(1.05);
}

/* ======================= */
/* Occupancy modal */
/* ======================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
}

.modal-content {
  width: min(520px, calc(100% - 28px));
  margin: 8vh auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 20px 60px rgba(0,0,0,0.20);
  padding: 16px;
}

.modal-content h2 {
  margin: 0 0 12px;
  font-family: 'PT Serif', serif;
}

.close {
  float: right;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.modal-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.12);
}

.modal-field label { font-weight: 800; }

.number-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.number-input button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.02);
  font-size: 18px;
  cursor: pointer;
}

.number-input input[type="number"] {
  width: 70px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.16);
  text-align: center;
  font-weight: 800;
}

#children-inputs .child-age { margin-top: 10px; }
#children-inputs .child-age label {
  font-size: 13px;
  color: var(--avrora-muted);
  display: block;
  margin-bottom: 6px;
}
#children-inputs .child-age select {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.16);
  padding: 0 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.modal-actions button {
  border-radius: 12px;
  padding: 10px 14px;
  border: 0;
  background: var(--avrora-green);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

/* ======================= */
/* Houses list */
/* ======================= */
.house-list {
  width: min(1100px, calc(100% - 32px));
  margin: 18px auto 34px;
}

.house-item {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.07);
  margin-bottom: 16px;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
}

.house-item .house-image {
  width: 40%;
  min-width: 170px;
  object-fit: cover;
  border-right: 1px solid rgba(0,0,0,0.06);
}

.house-item .house-info {
  width: 60%;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.house-item .house-info h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.house-item .house-info p {
  margin: 0;
  font-size: 14px;
  color: #465546;
  line-height: 1.45;
}

.house-price { font-weight: 900; color: var(--avrora-green); }

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.button-group a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  transition: transform .15s ease, background .2s ease;
}

.button-group a.button {
  background: var(--avrora-accent);
  color: #fff;
}

.button-group a.button:hover {
  background: #ff5252;
  transform: translateY(-1px);
}

.button-group .detail-button {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.10);
  color: #1f2a1f;
}

.button-group .detail-button:hover {
  background: rgba(0,0,0,0.07);
  transform: translateY(-1px);
}

/* ======================= */
/* Mobile */
/* ======================= */
@media (max-width: 768px) {
  .search-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .search-fields-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
  }
  .search-button {
    margin-left: 0;
    width: 100%;
    margin-top: 8px;
  }
  .search-button .button {
    width: 100%;
    text-align: center;
  }

  .search-field {
    flex: none !important;
    width: 100%;
    margin: 0 0 8px 0;
    height: auto !important;
    padding: 0;
  }

  .search-field.date-field {
    flex: 1;
    width: 48%;
    max-width: none;
  }

  .search-field input,
  .search-field select {
    width: 100%;
    box-sizing: border-box;
  }

  .house-item { flex-direction: column; }
  .house-item .house-image { width: 100%; border-right: 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .house-item .house-info { width: 100%; }
}

/* ========================================= */
/* Checkout/Payment/Confirmation (distraction-free) */
/* ========================================= */
.booking-checkout-page {
  padding-top: 0 !important;
}

.booking-min-header {
  position: sticky;
  top: 0;
  z-index: 50;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.booking-min-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.booking-min-header__logo img {
  height: 34px;
  width: auto;
  display: block;
}

.booking-min-header__title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.booking-min-header__back {
  margin-left: auto;
  text-decoration: none;
  color: var(--avrora-green);
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,168,142,0.28);
  background: rgba(0,168,142,0.08);
}

.booking-min-header__back:hover {
  background: rgba(0,168,142,0.14);
}

.booking-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px 0 40px;
}

.booking-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: var(--avrora-shadow);
  padding: 18px 18px 16px;
}

.booking-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.booking-summary__title {
  font-size: 22px;
  margin: 0;
  font-family: 'PT Serif', serif;
}

.booking-summary__badge {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,168,142,0.12);
  color: #0f766e;
  border: 1px solid rgba(0,168,142,0.22);
}

.booking-summary__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.booking-summary__item {
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 10px 12px;
}

.booking-summary__label {
  font-size: 12px;
  color: #666;
  font-weight: 700;
  margin-bottom: 4px;
}

.booking-summary__value {
  font-size: 14px;
  font-weight: 800;
}

.booking-summary__price { color: var(--avrora-green); }

.booking-summary__desc {
  margin-top: 12px;
  color: #555;
  line-height: 1.45;
}

.booking-summary__details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.14);
}

.booking-summary__details summary {
  cursor: pointer;
  font-weight: 800;
  color: #222;
}

.booking-summary__details ul {
  margin-top: 10px;
  padding-left: 18px;
}

.booking-summary__details li {
  margin: 6px 0;
  color: #333;
}

.booking-form-card__title {
  font-size: 18px;
  margin: 0 0 12px;
  font-family: 'PT Serif', serif;
}

.booking-form-card__hint {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
  line-height: 1.35;
}

.booking-hold-warning {
  color: #b42318;
  font-weight: 800;
}

.booking-hold-warning__timer {
  color: #d92d20;
  font-size: 20px;
  font-weight: 900;
  margin-left: 6px;
}

.checkout-form label { font-weight: 800; }

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="date"] {
  width: 100%;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.16);
  padding: 12px;
  font-size: 14px;
  box-sizing: border-box;
}

.checkout-form input:focus {
  outline: none;
  border-color: rgba(255,107,107,0.9);
  box-shadow: 0 0 0 4px rgba(255,107,107,0.18);
}

.form-group { margin-bottom: 10px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.booking-submit {
  width: 100%;
  border-radius: 12px;
  background: var(--avrora-accent);
  color: #fff;
  font-weight: 900;
  border: 0;
}

.booking-submit:hover {
  background: #ff5252;
  transform: translateY(-1px);
}

.booking-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.booking-consent {
  margin-top: 6px;
}

.booking-consent__label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: #333;
}

.booking-consent__label input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
}

.booking-consent__link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.booking-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.booking-consent-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.booking-consent-modal__dialog {
  position: relative;
  width: min(700px, calc(100% - 28px));
  margin: 8vh auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.24);
  padding: 16px 18px 14px;
}

.booking-consent-modal__close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.booking-consent-modal__title {
  margin: 0 28px 10px 0;
  font-family: 'PT Serif', serif;
  font-size: 22px;
  color: #1f2a1f;
}

.booking-consent-modal__content {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

body.booking-consent-modal-open {
  overflow: hidden;
}

.booking-promo-form {
  margin-top: 16px;
}

.booking-promo-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.booking-promo-form__input {
  width: 100%;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.16);
  padding: 12px;
  font-size: 14px;
  box-sizing: border-box;
}

.booking-promo-form__input:focus {
  outline: none;
  border-color: rgba(255,107,107,0.9);
  box-shadow: 0 0 0 4px rgba(255,107,107,0.18);
}

.booking-promo-form__apply {
  border: 0;
  border-radius: 12px;
  background: rgba(0,168,142,0.12);
  border: 1px solid rgba(0,168,142,0.35);
  color: #0f766e;
  font-weight: 800;
  padding: 0 16px;
  cursor: pointer;
  min-height: 44px;
}

.booking-promo-form__feedback {
  margin-top: 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
  border: 1px solid transparent;
}

.booking-promo-form__feedback.is-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #166534;
}

.booking-promo-form__feedback.is-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.booking-payment-bottom {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  position: sticky;
  bottom: 10px;
}

.booking-payment-bottom__label {
  font-size: 12px;
  color: #666;
  font-weight: 700;
  margin-bottom: 2px;
}

.booking-payment-bottom__old {
  font-size: 13px;
  color: #7c8486;
  text-decoration: line-through;
}

.booking-payment-bottom__value {
  font-size: 24px;
  line-height: 1.1;
  color: var(--avrora-green);
  font-weight: 900;
}

.booking-payment-bottom__submit {
  width: auto;
  white-space: nowrap;
  min-height: 48px;
  padding: 0 20px;
}

/* Payment and confirmation pages use one-column shell */
.booking-payment-page .booking-shell,
.booking-confirm-page .booking-shell {
  grid-template-columns: 1fr;
}

.booking-payment-page .booking-card {
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .booking-shell { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .booking-promo-form__row { grid-template-columns: 1fr; }
  .booking-payment-bottom {
    flex-direction: column;
    align-items: stretch;
    bottom: 8px;
  }
  .booking-payment-bottom__submit {
    width: 100%;
  }
  .booking-consent-modal__dialog {
    margin-top: 6vh;
  }
}

/* Guests modal errors (booking_system/index.php and similar) */
.occupancy-error {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.35;
}

#occupancy-modal select.select-error,
#occupancy-modal input.input-error {
  border-color: rgba(239, 68, 68, 0.95) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14) !important;
}
/* booking_system/index.php: hint that search results are not refreshed after changing dates/guests */
.search-button .button.is-dirty {
  /* Same visual language as current hover, but running automatically */
  background: #4eab9d;
  transform: scale(1.03);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  animation: bookingSearchButtonPulse 1.25s ease-in-out infinite;
}

@keyframes bookingSearchButtonPulse {
  0%, 100% { transform: scale(1.00); }
  50% { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .search-button .button.is-dirty { animation: none; }
}

