/* ============================================================
   Doha Quest Booking Pages — brand overrides on top of WPOS CSS
   ============================================================ */

/* ── Scroll container: keep viewport as scroller for sticky to work ── */
/* CRITICAL: overflow-x:hidden on body auto-promotes overflow-y to auto,
   turning body into the scroll container and breaking position:sticky.
   overflow-x:clip does NOT create a scroll container — safe to use.   */
html {
  overflow-x: clip !important;
  overflow-y: visible !important;
  height: auto !important;
}
body {
  /* overflow-x:clip does NOT coerce overflow-y:visible to auto (unlike hidden).
     This keeps the VIEWPORT as scroll container → position:sticky works. */
  overflow-x: clip !important;
  overflow-y: visible !important;
  height: auto !important;
}
/* Kill Swiper/jQuery inline scroll-lock */
body[style*="overflow: hidden"],
body[style*="overflow:hidden"] {
  overflow: visible !important;
}
/* Kill the main-site marketing dialog on booking pages */
#dialog-popup,
.modal-news-container,
dialog:not(#dq-custom-dialog) {
  display: none !important;
  visibility: hidden !important;
}

/* ── DQ brand variables for WPOS plugin ─────────────────── */
:root {
  --wpos-blue-clr:         #520B75;
  --wpos-violet-clr:       #520B75;
  --wpos-violet-hvr-clr:   #3d0857;
  --wpos-yellow-clr:       #F2B02D;
  --wpos-white-clr:        #ffffff;
  --wpos-black-clr:        #1a1a1a;
  --wpos-nine-color:       #333333;
  --wpos-light-sky:        #f5eefa;
  --wpos-green-clr:        #28a745;
  --dark-green:            #520B75;   /* original maps this to purple for Add to Cart btn */
  --global-palette7:       #f5f5f5;
  --wpos-light-gray-color: #f8f9fa;
  --wpos-light-bg-color:   #f9f9f9;
  --wpos-light-black-color:#555555;
  /* Original WP theme palette vars used by wpos-booking.css */
  --global-palette1:       #510c76;   /* purple */
  --global-palette7:       #EDF2F7;   /* calendar header bg (light blue-gray) */
  --global-palette9:       #ffffff;
}

/* ── Page header (OLD purple header — replaced by photo hero) ─ */
/* .booking-page-header no longer used: replaced with .entry-hero */
.booking-page-header { display: none !important; }
.booking-page-wrap {
  max-width: 1100px;
}

/* ── Plain dark-purple hero (Steps 2-5) — matches original booking site ── */
section.dq-plain-hero {
  background: #2d0a45 !important;
  min-height: 160px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}
section.dq-plain-hero .dq-plain-hero-inner {
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}
section.dq-plain-hero .entry-title {
  color: #fff !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  margin: 0 !important;
  text-shadow: none !important;
}

/* ── Breadcrumb bar ──────────────────────────────────────── */
.wpos-wc-bw-step-timer-wrp {
  background: #fff;
  border-radius: 8px;
  padding: 16px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  margin-bottom: 8px;
}
.wpos-wc-bw-bkn-wrap ul {
  margin: 0 !important;
}
/* Each breadcrumb <li> must be flex-row so link text and chevron sit side-by-side */
.wpos-wc-bw-bkn {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}
.wpos-wc-bw-bkn a {
  color: #888;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: color .2s;
  white-space: nowrap;
}
.wpos-wc-bw-bkn a:hover { color: #520B75; }
.wpos-wc-bw-bkn.active a {
  color: #520B75;
  font-weight: 700;
  border-bottom: 2px solid #520B75;
  padding-bottom: 4px;
}
.wpos-wc-bw-bkn .wpos-wc-bw-icon-right {
  color: #ccc;
  font-size: .75rem;
}

/* ── Booking wrap card ───────────────────────────────────── */
.wpos-bw-booking-wrap {
  background: #fff;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.wpos-wc-bw-parent-cat-ttl {
  font-size: 1.3rem;
  font-weight: 700;
  color: #520B75;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0e6f8;
}

/* ── Category card ───────────────────────────────────────── */
.wpos-wc-bw-product-cat-list {
  border: 1px solid #e8d5f5;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.wpos-wc-bw-product-cat-list:hover {
  box-shadow: 0 6px 24px rgba(82,11,117,.15);
}
.wpos-wc-bw-cat-img {
  min-height: 240px !important;
  height: 240px !important;
  width: 100%;
  object-fit: cover;
  display: block;
}
.wpos-wc-bw-cat-img-inr img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}
.wpos-wc-bw-cat-cnt-wrp { padding: 20px; }
.wpos-wc-bw-cat-ttl {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
}
.mwbook-book-btn {
  display: inline-block;
  background: #520B75;
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s;
}
.mwbook-book-btn:hover { background: #3d0857; }

/* ── Accordion heading — match original plugin colors ────── */
/* Inactive: white bg, green text (matches .wpos-wc-bw-product-ccat .wpos-wc-bw-acc-heading) */
.wpos-wc-bw-product-ccat .wpos-wc-bw-acc-heading {
  background: #ffffff !important;
  color: #38aa4a !important;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  transition: background .2s, color .2s;
}
.wpos-wc-bw-product-ccat .wpos-wc-bw-acc-heading * { color: #38aa4a !important; }
/* Active: gold bg, black text (matches .wpos-wc-bw-acc-active) */
.wpos-wc-bw-product-ccat.wpos-wc-bw-acc-active .wpos-wc-bw-acc-heading {
  background: #ffc107 !important;
  color: #000000 !important;
}
.wpos-wc-bw-product-ccat.wpos-wc-bw-acc-active .wpos-wc-bw-acc-heading * { color: #000000 !important; }

.wpos-wcb-booking-ct-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #520B75;
}
.wpos-wcb-booking-ct-icon i { color: #520B75; }
.wpos-wc-bw-acc-icon { color: #520B75; }

/* ── Date picker header ──────────────────────────────────── */
.wpos-wcb-booking-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 12px;
  border-bottom: 1px solid #f0e6f8;
  margin-bottom: 16px;
}
.wpos-wcb-booking-date-ttl {
  font-weight: 600;
  color: #333;
}
.wpos-wcb-selected-date {
  font-weight: 700;
  color: #520B75;
  font-size: 1.05rem;
}
.wpos-wcb-change-date {
  cursor: pointer;
  color: #520B75;
  font-weight: 600;
  font-size: .85rem;
  border: 1px solid #520B75;
  padding: 4px 12px;
  border-radius: 4px;
  transition: all .2s;
}
.wpos-wcb-change-date:hover { background: #520B75; color: #fff; }

/* ── jQuery UI datepicker overrides ─────────────────────── */
.wpos-wcb-datepicker .ui-datepicker {
  font-family: inherit;
  border: 1px solid #e0cff0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(82,11,117,.12);
  padding: 12px;
  width: auto;
  min-width: 280px;
}
.wpos-wcb-datepicker .ui-datepicker-header {
  background: #EDF2F7;     /* original: var(--global-palette7) — light blue-gray, NOT purple */
  color: #333;
  border: 0;
  border-radius: 6px 6px 0 0;
  padding: 10px 8px;
}
.wpos-wcb-datepicker .ui-datepicker-title {
  font-weight: 700;
  color: #333;
}
.wpos-wcb-datepicker .ui-datepicker-prev,
.wpos-wcb-datepicker .ui-datepicker-next {
  top: 6px;
  cursor: pointer;
}
.wpos-wcb-datepicker .ui-datepicker-prev span,
.wpos-wcb-datepicker .ui-datepicker-next span { color: #555; }
.wpos-wcb-datepicker .ui-datepicker-calendar th {
  color: #520B75;
  font-weight: 700;
  font-size: .8rem;
}
.wpos-wcb-datepicker .ui-datepicker-calendar td a,
.wpos-wcb-datepicker .ui-datepicker-calendar td span {
  border-radius: 50%;
  text-align: center;
  transition: background .15s;
}
/* Hover: gold — matches original */
.wpos-wcb-datepicker .ui-datepicker-calendar td a:hover {
  background: #ffc107 !important;
  color: #000 !important;
  border-color: #ffc107 !important;
}
/* Today highlight */
.wpos-wcb-datepicker .ui-state-highlight {
  background: #fff8e1 !important;
  color: #333 !important;
  border: 2px solid #ffc107 !important;
}
/* Selected day: gold — matches original */
.wpos-wcb-datepicker .ui-state-active,
.wpos-wcb-datepicker .ui-state-active:hover {
  background: #ffc107 !important;
  color: #000 !important;
  border-color: #ffc107 !important;
  font-weight: 700;
}

/* ── Datepicker closed/holiday day styling (match original plugin) ── */
/* Closed (red) — Sundays use wpos-wc-bw-eg-close class */
.wpos-wcb-datepicker td.wpos-wc-bw-eg-close span {
  background-color: #c42a2a !important;
  color: #ffffff !important;
}
/* Holiday (orange) */
.wpos-wcb-datepicker td.wpos-wc-bw-h-close span {
  background-color: #f67c10 !important;
  color: #ffffff !important;
}
/* Legend dots — all three states */
.wpos-wcb-booking-status-open .wpos-wcb-booking-status-mark    { background-color: #28a745 !important; border-color: transparent !important; }
.wpos-wcb-booking-status-closed .wpos-wcb-booking-status-mark  { background-color: #c42a2a !important; border-color: transparent !important; }
.wpos-wcb-booking-status-holiday .wpos-wcb-booking-status-mark { background-color: #f67c10 !important; border-color: transparent !important; }

/* ── Ticket list cards ───────────────────────────────────── */
.wpos-wcb-product-lists-wrap { margin-top: 20px; }
.wpos-wcb-list {
  border: 1px solid #e8d5f5;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: #fff;
  transition: box-shadow .2s;
}
.wpos-wcb-list:hover { box-shadow: 0 4px 16px rgba(82,11,117,.1); }
.wpos-wcb-product-list-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.wpos-wcb-product-desc { flex: 1 1 200px; }
.wpos-wcb-product-title {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 1rem;
}
.wpos-wcb-product-price {
  font-weight: 700;
  color: #520B75;
  font-size: 1.05rem;
  white-space: nowrap;
}
.woocommerce-Price-currencySymbol { margin-right: 2px; }

/* ── Qty controls ────────────────────────────────────────── */
.dq-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}
.dq-qty-ctrl .dq-minus,
.dq-qty-ctrl .dq-plus {
  background: #f5eefa;
  border: 0;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #520B75;
  cursor: pointer;
  transition: background .15s;
  line-height: 1;
}
.dq-qty-ctrl .dq-minus:hover,
.dq-qty-ctrl .dq-plus:hover { background: #520B75; color: #fff; }
.dq-qty-ctrl .dq-qty-input {
  width: 48px;
  border: 0;
  text-align: center;
  font-weight: 700;
  font-size: .95rem;
  outline: none;
  padding: 0;
  height: 36px;
  -moz-appearance: textfield;
}
.dq-qty-ctrl .dq-qty-input::-webkit-inner-spin-button,
.dq-qty-ctrl .dq-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Mini cart sidebar ───────────────────────────────────── */
.wpos-bw-booking-right {
  flex: 0 0 260px;
}
@media (max-width: 991px) {
  .wpos-bw-booking-right { flex: 1 1 100%; }
}
.wpos-wc-bw-cart-side-widget {
  background: #f9f6ff;
  border: 1px solid #e0cff0;
  border-radius: 8px;
  padding: 18px;
}
.wpos-wc-bw-cart-side-ttl {
  font-weight: 700;
  color: #520B75;
  font-size: .95rem;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0cff0;
}
.dq-mini-cart-line {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  margin-bottom: 6px;
  color: #333;
}
.dq-mini-cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: .95rem;
  color: #520B75;
  padding-top: 10px;
  border-top: 1px solid #e0cff0;
  margin-top: 8px;
}

/* ── Date popup ──────────────────────────────────────────── */
.dq-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
}
.wpos-wc-bw-popup-data-wrp {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  padding: 0;
  overflow: hidden;
  min-width: 320px;
  max-width: 420px;
  width: 90%;
}
.wpos-wc-bw-popup-data-cnt { padding: 24px; }
.wpos-wc-bw-popup-cnt-block { position: relative; }
.wpos-wc-bw-popup-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  z-index: 1;
}
.wpos-wc-bw-popup-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #520B75;
  margin-bottom: 12px;
}
.wpos-wc-bw-popup-body { font-size: .9rem; color: #444; }

/* ── Checkout form ───────────────────────────────────────── */
.dq-field {
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.dq-field:focus {
  border-color: #520B75;
  box-shadow: 0 0 0 3px rgba(82,11,117,.1);
  outline: none;
}
.dq-field.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220,53,69,.1);
}
.form-label.fw-600 { font-weight: 600; font-size: .88rem; color: #444; }

/* ── Cart table ──────────────────────────────────────────── */
.wpos-wc-bw-cart-table th {
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
}
.wpos-wc-bw-cart-table td {
  vertical-align: middle;
  padding: 14px 16px;
  border-color: #f0e6f8;
}
.dq-cart-remove-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: .9rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .15s;
}
.dq-cart-remove-btn:hover { background: #fff5f5; }

/* ── Status dots ─────────────────────────────────────────── */
.wpos-wcb-booking-status-wrap {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: #555;
}
.wpos-wcb-booking-status {
  display: flex;
  align-items: center;
  gap: 5px;
}
.wpos-wcb-booking-status-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.wpos-wcb-booking-status-open .wpos-wcb-booking-status-mark { background: #4caf50; }

/* ── Layout for ticket step ──────────────────────────────── */
.wpos-wc-bw-product-cat-acc {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.wpos-bw-booking-left { flex: 1 1 500px; }

/* ── Product list cards (wpos-bw-product-list structure) ─────
   Mirrors original bookings.dohaquest.com plugin layout         */
.wpos-bw-product-lists-wrap { margin-top: 20px; max-width: 820px; }

/* Card wrapper — separator line between cards (matches original) */
.wpos-bw-product-list {
  border-bottom: 1px solid #ddd;
  margin-bottom: 0;
}
.wpos-bw-product-list:last-child { border-bottom: none; }

/* Inner flex row — beige bg matches original */
.wpos-bw-product-list-inr {
  display: flex !important;
  align-items: center;
  gap: 16px;
  background-color: #EEEBE4;
  border-radius: 8px;
  padding: 20px 16px;
  flex-wrap: nowrap !important;
}

/* Product image column */
.wpos-bw-product-img-wrap {
  flex: 0 0 120px !important;
  width: 120px !important;
  max-width: 120px !important;
}
.wpos-bw-product-img {
  width: 100% !important;
  height: 110px !important;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Middle column: title + price + desc */
.wpos-bw-product-cnt-wrap {
  flex: 1 1 0;
  flex-basis: 38%;
  min-width: 160px;
}
/* Product title — purple bold (mirrors .wpos-bw-product-ttl in plugin) */
.wpos-bw-product-ttl {
  font-size: 1rem !important;
  font-weight: 700;
  color: #520B75;
  margin: 0 0 6px;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
}
/* Price wrap row */
.wpos-bw-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}
/* Price span — normal weight black, "QAR 235.00" */
.wpos-bw-price {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}
.wpos-bw-currency { margin-right: 2px; }
/* " / Ticket" suffix */
.wpos-bw-ticket-text {
  font-size: .85rem;
  color: #555;
}
/* FREE badge */
.wpos-bw-free-price {
  font-size: 1rem;
  font-weight: 700;
  color: #28a745;
}
/* Description text under price */
.wpos-bw-product-desc-wrap { margin-top: 2px; }
.wpos-bw-product-desc {
  font-size: .84rem;
  color: #666;
  display: block;
  text-decoration: none !important;
  cursor: default;
}
/* "Show Details" popup link — override the generic desc block style */
.wpos-bw-product-popup-js {
  text-decoration: underline !important;
  cursor: pointer !important;
  color: #2d3748 !important;
  display: inline-block !important;
}

/* Far-right column: live line-total price */
.wpos-bw-total-price-wrap {
  flex: 0 0 90px !important;
  width: 90px !important;
  max-width: 90px !important;
  text-align: right;
  font-size: .95rem;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
}
.wpos-bw-total-price-wrap .wpos-bw-currency { margin-right: 2px; }

/* Right column: qty + add-to-cart */
.wpos-bw-meta-wrap {
  flex: 0 0 210px !important;
  width: 210px !important;
  max-width: 210px !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

/* Qty input between the pills — spin buttons hidden */
.wpos-bw-product-list .dq-qty-input {
  -moz-appearance: textfield;
}
.wpos-bw-product-list .dq-qty-input::-webkit-inner-spin-button,
.wpos-bw-product-list .dq-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Qty error message */
.wpos-bw-qty-err { display: none; font-size: .8rem; color: #c0392b; margin-top: 4px; }
.wpos-bw-qty-err.wpos-bw-show { display: block; }

/* Per-product "Add to Cart" — wpos-booking.css already sets purple via --wpos-violet-clr.
   We just need border fix and the feedback state.                                         */
.wpos-wc-add-to-cart-btn.dq-add-single {
  cursor: pointer;
  border: none;
}
/* "Added ✓" feedback state */
.wpos-wc-add-to-cart-btn.dq-btn-added {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
}

/* Card shake/flash when qty is 0 and user clicks Add */
.wpos-bw-product-list.dq-card-warn .wpos-bw-product-list-inr {
  outline: 2px solid #F2B02D;
  animation: dq-warn-shake 0.4s ease;
}
@keyframes dq-warn-shake {
  0%,100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  40%       { transform: translateX(4px); }
  60%       { transform: translateX(-3px); }
  80%       { transform: translateX(3px); }
}

/* Cart total footer bar */
.dq-ticket-total-bar {
  background: #f9f6ff;
  border: 1px solid #e0cff0;
  border-radius: 8px;
  padding: 14px 20px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .wpos-bw-product-list-inr { flex-wrap: wrap !important; gap: 12px; }
  .wpos-bw-product-img-wrap { width: 80px; }
  .wpos-bw-product-img { width: 80px; height: 80px; }
  .wpos-bw-product-cnt-wrap { flex: 1 1 120px; min-width: 120px; }
  .wpos-bw-meta-wrap { width: 100%; align-items: flex-start; flex-basis: 100%; }
  .wpos-bw-total-price-wrap { display: none; } /* hide right-side price on mobile, shown in footer bar */
}
@media (max-width: 576px) {
  .wpos-wcb-product-list-inner { flex-direction: column; align-items: flex-start; }
  .wpos-wc-bw-bkn-wrap ul { gap: 10px; }
  .wpos-wc-bw-bkn a { font-size: .78rem; }
  .booking-page-title { font-size: 1.3rem; }
  .wpos-bw-booking-wrap { padding: 16px; }
}
