/* Sunny Oasis — Booking Form (mobile-first)
   Matches templates/booking-form.php markup
   Palette: ocean blue, light gray borders, email-style card
*/

/* ---------- Brand tokens ---------- */
:root {
  --so-blue: #2563eb; /* primary */
  --so-blue-dark: #1d4ed8;
  --so-blue-soft: #3b82f6;
  --so-text: #111827;
  --so-muted: #6b7280;
  --so-border: #e5e7eb;
  --so-panel: #f8fafc;
  --so-bg: #ffffff;
}

/* ---------- Layout / Card ---------- */
.so-booking-wrap {
  max-width: 1020px;
  margin: 0 auto;
  padding: 16px;
}
/* Callout: same visual width as the calendar card */
.so-booking-wrap .so-callout-narrow {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 12px 0 20px 0;
}
}

/* Optional: line up the two info boxes nicely on wide screens */
@media (min-width: 960px) {
  /* Stack alerts/callouts vertically so the season window sits above the calendar */
  .so-booking-wrap .so-alerts {
    display: block;
  }
  .so-booking-wrap .so-callout-narrow {
    max-width: 360px; /* visually align with calendar card */
    margin: 8px 0 16px 0; /* add spacing above the grid */
  }
}
.so-card {
  background: var(--so-bg);
  border: 1px solid #e9eef5;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  overflow: hidden;
  position: relative;
}
@media (max-width: 720px) {
  .so-card {
    padding: 24px 24px;
  } /* extra inner space on phones */
}
@media (max-width: 720px) {
  .so-booking-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }
}
.so-title {
  margin: 0 0 0.25rem;
  font: 600 20px/1.4 Arial, Helvetica, sans-serif;
  color: var(--so-text);
}
.so-intro {
  margin: 0 0 0.75rem;
  color: #374151;
  font: 14px/1.6 Arial, Helvetica, sans-serif;
}
.so-season-note {
  font: 12px/1.5 Arial, Helvetica, sans-serif;
  color: var(--so-muted);
  margin: 0 0 1rem;
}
/* Generic callout */
.callout {
  position: relative;
  border: 1px solid #e5e7eb;
  border-left-width: 4px;
  border-radius: 10px;
  padding: 16px 18px 16px 56px;
  background: #f8fafc;
  margin: 0;
  font: 15px/1.6 Arial, Helvetica, sans-serif;
  color: #374151;
}

/* Variants (add more if you need) */
.callout-info {
  background: #fff9d9;
  border-color: #fdc109;
}

.callout-warning {
  background: #fff8e1;
  border-color: #fde68a;
}

.callout-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.callout strong {
  display: block;
  margin-bottom: 6px;
  font: 700 17px/1.4 Arial, Helvetica, sans-serif;
  color: #1f2937;
}
.callout-info::before {
  content: 'i';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(253, 193, 9, 0.95);
  color: #111827;
  font: 700 16px/28px Arial, Helvetica, sans-serif;
  text-align: center;
  box-shadow: 0 4px 12px rgba(253, 193, 9, 0.35);
}
/* ---------- Grid ---------- */
.so-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}
/* Allow children to shrink inside grid to avoid right-edge overflow */
.so-cols > * {
  min-width: 0;
}
@media (max-width: 720px) {
  .so-cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- Labels & inputs ---------- */
.so-label {
  display: block;
  margin: 12px 0 6px;
  font: 600 13px/1.3 Arial, Helvetica, sans-serif;
  color: var(--so-text);
}
.so-subtitle {
  margin: 16px 0 6px;
  font: 600 14px Arial, Helvetica, sans-serif;
  color: var(--so-text);
}
.so-input,
select.so-input,
textarea.so-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: var(--so-text);
  font: 14px/1.4 Arial, Helvetica, sans-serif;
  max-width: 100%;
  padding-right: 14px;
}
.so-input:focus {
  outline: none;
  border-color: var(--so-blue-soft);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* Helper text inline */
.so-help {
  font-size: 12px;
  color: var(--so-muted);
}

/* ---------- Price panel (email-like) ---------- */
.so-price {
  background: var(--so-panel);
  border: 1px solid var(--so-border);
  border-radius: 8px;
  padding: 12px 16px;
  height: max-content;
}
.so-price-title {
  font: 600 14px/1.3 Arial, Helvetica, sans-serif;
  color: var(--so-text);
  margin-bottom: 6px;
}
.so-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font: 14px Arial, Helvetica, sans-serif;
  color: var(--so-text);
}
.so-price-row span {
  color: var(--so-muted);
}
.so-price-total {
  border-top: 1px dashed var(--so-border);
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 700;
}

/* ---------- Actions / Messages ---------- */
.so-actions {
  margin-top: 16px;
}
.so-btn {
  display: inline-block;
  background: var(--so-blue);
  color: #fff;
  border: 1px solid var(--so-blue-dark);
  border-radius: 8px;
  padding: 10px 14px;
  font: 600 14px/1.2 Arial, Helvetica, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}
.so-btn:hover {
  background: var(--so-blue-dark);
  filter: brightness(0.95);
}
@media (max-width: 720px) {
  .so-btn {
    width: 100%;
    text-align: center;
  }
}
.so-msg {
  margin-top: 10px;
  font: 14px/1.5 Arial, Helvetica, sans-serif;
}

/* ---------- Flatpickr (desktop only) ---------- */
/* Calendar styles moved to assets/css/calendar.css (Litepicker inline month view) */

.so-inline-msg {
  margin-top: 6px;
  font: 12px/1.5 Arial, Helvetica, sans-serif;
  color: #b91c1c;
}
.so-price .so-actions-price {
  margin-top: 10px;
}
.so-price .so-btn {
  width: 100%;
  text-align: center;
}
.so-terms {
  margin-top: 12px;
  font: 12px/1.5 Arial, Helvetica, sans-serif;
  color: #4b5563;
}
.so-terms label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.so-terms label:hover,
.so-terms label:focus-within {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.04);
}
.so-terms input[type="checkbox"] {
  margin-top: 0;
  width: 25px;
  height: 25px;
}
.so-terms a {
  color: var(--so-blue);
  text-decoration: none;
}
.so-terms a:hover,
.so-terms a:focus {
  text-decoration: underline;
}
.so-price .so-paypal {
  margin-top: 10px;
}
.so-price .so-msg {
  margin-top: 10px;
}
/* Ensure our grid layout isn't overridden by theme styles */
.so-booking-wrap .so-cols {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  min-width: 0;
}

/* Space between the primary button and PayPal buttons */
.so-actions-price {
  margin-bottom: 50px;
}
.so-paypal {
  margin-top: 0;
} /* keep the gap controlled by the block above */

/* 1) Make everything inside the widget respect the container width */
.so-booking-wrap *,
.so-booking-wrap *::before,
.so-booking-wrap *::after {
  box-sizing: border-box !important;
  max-width: 100%;
}

/* Keep form controls inside the card bounds on mobile */
.so-booking-wrap input[type="text"],
.so-booking-wrap input[type="email"],
.so-booking-wrap input[type="tel"],
.so-booking-wrap input[type="number"],
.so-booking-wrap select,
.so-booking-wrap textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
}

/* 2) Prevent any child (inputs, calendar, PayPal) from overflowing */
.so-booking-wrap .so-card {
  overflow: hidden;
}
.so-booking-wrap .so-input,
.so-booking-wrap select.so-input,
.so-booking-wrap textarea.so-input {
  width: 100%;
}

/* 3) Grid column must allow shrink on small screens */
/* Removed duplicate .so-booking-wrap .so-cols with 260px column */

/* 4) Calendar: clamp width 100% */
.so-booking-wrap .so-calendar,
.so-booking-wrap .litepicker,
.so-booking-wrap .litepicker .container__main {
  max-width: 100%;
}
.so-booking-wrap .litepicker .container__main {
  padding: 8px 10px;
}

/* Desktop calendar sizing: shrink-wrap but never exceed the column */
.so-booking-wrap .so-calendar {
  display: inline-block;
  width: auto;
  max-width: 100%;
}
.so-booking-wrap .so-calendar .litepicker,
.so-booking-wrap .so-calendar .litepicker .container,
.so-booking-wrap .so-calendar .litepicker .container__main {
  display: inline-block;
  width: auto !important;
  max-width: 100% !important;
}
@media (min-width: 721px) {
  /* Visually cap the calendar width inside the left column */
  .so-booking-wrap .so-calendar {
    max-width: 360px;
  }
}

/* 5) PayPal buttons/iframe: never overflow, fill width */
#so-paypal,
#so-paypal iframe,
.so-booking-wrap .paypal-buttons,
.so-booking-wrap .paypal-buttons iframe {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* 6) Extra safety for small screens */
@media (max-width: 720px) {
  .so-booking-wrap .so-cols {
    grid-template-columns: 1fr;
  }
  .so-booking-wrap .so-price {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .so-booking-wrap .so-card {
    overflow-x: hidden;
  }
}

/* booking-form.css */
.so-inline-msg {
  margin-top: 6px;
  font: 12px/1.4 Arial, Helvetica, sans-serif;
  color: crimson; /* set by JS as well */
}
