/* ============================================================
   ZClean — Booking Form & Modal Styles
   File: assets/css/booking.css
   ============================================================ */

/* ── Full Booking Form (Section) ────────────────────────────*/
.booking-section {
  background: linear-gradient(160deg, var(--blue-950) 0%, var(--blue-800) 100%);
  position: relative;
  overflow: hidden;
}
.booking-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.booking-wrapper {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* Left info panel */
.booking-info { color: var(--white); padding-top: var(--sp-4); }
.booking-info .section-title { color: var(--white); }
.booking-info .section-sub   { color: rgba(255,255,255,.65); margin-bottom: var(--sp-8); }

.booking-info-points {
  display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-8);
}
.booking-info-point {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
}
.booking-info-point__icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--blue-600); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
}
.booking-info-point__icon svg { width: 18px; height: 18px; fill: none; stroke: white; stroke-width: 2; }
.booking-info-point__title { font-size: 14px; font-weight: 700; color: white; margin-bottom: 2px; }
.booking-info-point__desc  { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.55; }

.booking-contact-direct {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,.1);
}
.booking-contact-direct p { font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: var(--sp-2); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.booking-contact-direct a {
  display: flex; align-items: center; gap: var(--sp-3);
  color: rgba(255,255,255,.8); font-size: 15px; font-weight: 600;
  transition: color var(--dur) var(--ease);
}
.booking-contact-direct a:hover { color: var(--blue-300); }
.booking-contact-direct a svg { width: 16px; height: 16px; fill: none; stroke: var(--blue-400); stroke-width: 2; flex-shrink: 0; }

/* ── The Form Card ───────────────────────────────────────────*/
.booking-form-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-xl);
}
.booking-form-card h3 {
  font-size: 20px; font-weight: 800; color: var(--blue-900);
  margin-bottom: 4px;
}
.booking-form-card .form-subtitle {
  font-size: 14px; color: var(--gray-400); margin-bottom: var(--sp-6);
}

/* ── Form Fields ─────────────────────────────────────────────*/
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.form-grid .form-field--full { grid-column: 1 / -1; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: .8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-field label .required-star { color: #ef4444; font-size: 14px; line-height: 1; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
  outline: none;
}
/* Error state */
.form-field input.is-error,
.form-field select.is-error,
.form-field textarea.is-error {
  border-color: #ef4444;
  background: #fff5f5;
}
.form-field input.is-error:focus,
.form-field select.is-error:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.field-error {
  font-size: 12px;
  color: #ef4444;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-error::before { content: '⚠'; }

/* Submit button */
.form-submit-btn {
  width: 100%;
  background: var(--blue-600);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  padding: 15px 24px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  box-shadow: 0 4px 20px rgba(30,77,183,.35);
}
.form-submit-btn:hover:not(:disabled) {
  background: var(--blue-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(30,77,183,.45);
}
.form-submit-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.btn-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Privacy note */
.form-privacy {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
  margin-top: var(--sp-3);
  line-height: 1.6;
}

/* ── Quick Booking Strip (homepage) ──────────────────────────*/
/* (Kept from components.css – just overrides) */
.booking-strip-new {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 40px);
  margin-top: -44px;
  position: relative;
  z-index: 10;
}
.booking-strip-new__form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: var(--sp-4);
  align-items: flex-end;
}
.booking-strip-new__form .form-field label { font-size: 11px; }

/* ── Success Modal ───────────────────────────────────────────*/
.modal {
  position: fixed; inset: 0; z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.modal.open { display: flex; }

.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(6,15,42,.6);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 52px);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modalIn .3s var(--ease) both;
  text-align: center;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-icon {
  width: 72px; height: 72px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-5);
}
.modal-icon svg { width: 36px; height: 36px; stroke: #22c55e; fill: none; stroke-width: 2.5; }
.modal-title { font-size: 22px; font-weight: 800; color: var(--blue-900); margin-bottom: var(--sp-3); }
.modal-desc  { font-size: 15px; color: var(--gray-500); line-height: 1.7; margin-bottom: var(--sp-6); }
.modal-info  {
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5);
  text-align: left; margin-bottom: var(--sp-6);
}
.modal-info-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.modal-info-row:not(:last-child) { border-bottom: 1px solid var(--blue-100); padding-bottom: 8px; margin-bottom: 8px; }
.modal-info-row span:first-child { color: var(--gray-500); }
.modal-info-row span:last-child  { font-weight: 700; color: var(--blue-900); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; color: var(--gray-500);
  transition: background var(--dur) var(--ease);
  border: none;
}
.modal-close:hover { background: var(--gray-200); }

/* ── Toast ───────────────────────────────────────────────────*/
#toast-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  line-height: 1.5;
  transform: translateX(120%);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
  pointer-events: auto;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.toast--error   { background: #fff5f5; color: #b91c1c; border: 1px solid #fecaca; }
.toast--info    { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }

/* ── Responsive ──────────────────────────────────────────────*/
@media (max-width: 1024px) {
  .booking-wrapper { grid-template-columns: 1fr; }
  .booking-info { display: none; } /* trên tablet chỉ show form */
}
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .form-field--full { grid-column: 1; }
  .booking-strip-new__form {
    grid-template-columns: 1fr 1fr;
  }
  .booking-strip-new__form .form-submit-wrapper { grid-column: 1 / -1; }
  .booking-strip-new__form .form-submit-wrapper .form-submit-btn { width: 100%; }
  #toast-container { right: 16px; bottom: 80px; }
}
@media (max-width: 480px) {
  .booking-strip-new__form { grid-template-columns: 1fr; }
}
