/* ==========================================================================
   Eworld Safaris — safari packages & rates (Phase 8)
   Safari page: .ewp-*   Booking page: .ewpb-*
   Uses the same tokens as ew-booking.css (--ewb-*), which follow the Theme manager.
   ========================================================================== */
.ewp { margin: 0 0 56px; font-family: var(--ewb-font, var(--font-body, 'Outfit', sans-serif)); color: var(--ewb-ink, #1F2937); scroll-margin-top: 110px; }
.ewp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin-bottom: 20px; }
.ewp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ewb-accent); background: rgba(var(--ewb-accent-rgb), .1); padding: 6px 14px; border-radius: 999px; }
.ewp-title h2 { margin: 12px 0 6px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--ewb-navy); }
.ewp-title p { margin: 0; color: var(--ewb-muted); font-size: 15px; line-height: 1.55; max-width: 560px; }
.ewp-title p b { color: var(--ewb-ink); font-weight: 600; }

.ewp-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.ewp-filters button { border: 1.5px solid var(--ewb-line); background: #fff; color: var(--ewb-navy); font: 600 13.5px var(--ewb-font); padding: 9px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: border-color .2s, background .2s, color .2s; }
.ewp-filters button em { font-style: normal; font-size: 11.5px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--ewb-soft); color: var(--ewb-muted); }
.ewp-filters button:hover { border-color: var(--ewb-accent); color: var(--ewb-accent); }
.ewp-filters button.is-on { background: var(--ewb-navy); border-color: var(--ewb-navy); color: #fff; }
.ewp-filters button.is-on em { background: rgba(255, 255, 255, .2); color: #fff; }

.ewp-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 20px; border-radius: 16px; background: rgba(var(--ewb-teal-rgb), .09); color: var(--ewb-navy); font-size: 14.5px; line-height: 1.55; }
.ewp-note i { color: var(--ewb-teal); margin-top: 3px; }

.ewp-badge { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--ewb-accent); padding: 4px 11px; border-radius: 999px; vertical-align: middle; }
.ewp [hidden] { display: none !important; }

/* ---------- rate buttons (shared by cards + table) ---------- */
.ewp-rate { font-family: var(--ewb-font); }
button.ewp-rate { cursor: pointer; border: 1.5px solid var(--ewb-line); background: #fff; color: var(--ewb-navy); transition: border-color .18s, background .18s, color .18s, box-shadow .18s, transform .18s; }
button.ewp-rate:hover { border-color: var(--ewb-accent); background: rgba(var(--ewb-accent-rgb), .06); }
button.ewp-rate:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(var(--ewb-accent-rgb), .4); }
button.ewp-rate.is-sel, button.ewp-rate.is-sel:hover { background: var(--ewb-accent); border-color: var(--ewb-accent); color: #fff; box-shadow: 0 14px 24px -14px rgba(var(--ewb-accent-rgb), .9); }

/* ---------- cards ---------- */
.ewp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; align-items: stretch; }
.ewp-card { display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--ewb-line); border-radius: 24px; overflow: hidden; transition: border-color .2s, box-shadow .25s, transform .25s; }
.ewp-card:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -32px rgba(var(--ewb-navy-rgb), .5); }
.ewp-card.is-picked { border-color: var(--ewb-accent); box-shadow: 0 0 0 3px rgba(var(--ewb-accent-rgb), .16), 0 30px 50px -32px rgba(var(--ewb-navy-rgb), .5); }
.ewp-media { position: relative; height: 168px; background: var(--ewb-soft) center / cover no-repeat; }
.ewp-media.is-blank { display: grid; place-items: center; background: var(--ewb-navy); }
.ewp-media.is-blank i { font-size: 46px; color: rgba(255, 255, 255, .28); }
.ewp-media .ewp-badge { position: absolute; left: 14px; top: 14px; }
.ewp-cat { position: absolute; right: 14px; top: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ewb-navy); background: rgba(255, 255, 255, .94); padding: 4px 11px; border-radius: 999px; }
.ewp-body { display: flex; flex-direction: column; flex: 1; padding: 20px 20px 18px; }
.ewp-body h3 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--ewb-navy); }
.ewp-sub { margin: 4px 0 0; font-size: 14px; color: var(--ewb-muted); }
.ewp-meal { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--ewb-teal); background: rgba(var(--ewb-teal-rgb), .1); padding: 5px 12px; border-radius: 999px; }
.ewp-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--ewb-muted); }
.ewp-feat { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.ewp-feat li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ewb-ink); }
.ewp-feat li i, .ewp-det li i { flex: 0 0 auto; color: var(--ewb-teal); font-size: 12px; margin-top: 4px; }
.ewp-det { margin-top: 10px; }
.ewp-det summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ewb-accent); }
.ewp-det summary::-webkit-details-marker { display: none; }
.ewp-det summary::after { content: "\f078"; font: 900 10px "Font Awesome 6 Free"; transition: transform .2s; }
.ewp-det[open] summary::after { transform: rotate(180deg); }
.ewp-det p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--ewb-muted); }
.ewp-det ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.ewp-det li { display: flex; gap: 9px; font-size: 14px; line-height: 1.45; }
.ewp-rates { margin-top: auto; padding-top: 18px; display: grid; gap: 8px; }
.ewp-card .ewp-rate { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 15px; text-align: left; }
.ewp-card .ewp-rl { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.ewp-card .ewp-rl small { display: block; font-size: 12px; font-weight: 500; opacity: .7; }
.ewp-card .ewp-rate b { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.ewp-card .ewp-rate i { display: none; font-size: 15px; }
.ewp-card button.ewp-rate.is-sel i { display: inline-block; }
.ewp-rate.is-info { border: 1.5px dashed var(--ewb-line); border-radius: 15px; color: var(--ewb-muted); }
.ewp-rate.is-info b { color: var(--ewb-ink); }

/* ---------- table ---------- */
.ewp-tablewrap { overflow-x: auto; border: 1.5px solid var(--ewb-line); border-radius: 24px; background: #fff; -webkit-overflow-scrolling: touch; }
.ewp-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
.ewp-table thead th { background: var(--ewb-navy); color: #fff; padding: 16px 18px; font-size: 14.5px; font-weight: 700; text-align: center; white-space: nowrap; }
.ewp-table thead th small { display: block; font-size: 11.5px; font-weight: 500; opacity: .72; margin-top: 2px; }
.ewp-table thead .ewp-th-name { text-align: left; }
.ewp-table tbody tr + tr > * { border-top: 1px solid var(--ewb-line); }
.ewp-table tbody tr:hover > * { background: #F8FAFD; }
.ewp-table tbody tr.is-picked > * { background: rgba(var(--ewb-accent-rgb), .06); }
.ewp-table td, .ewp-table .ewp-name { padding: 16px 18px; vertical-align: middle; }
.ewp-table td { text-align: center; }
.ewp-table .ewp-name { text-align: left; font-weight: 400; min-width: 230px; }
.ewp-name b { font-size: 16.5px; font-weight: 700; color: var(--ewb-navy); }
.ewp-name .ewp-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--ewb-muted); }
.ewp-name .ewp-meta i { color: var(--ewb-teal); margin-right: 5px; }
.ewp-name small { display: block; margin-top: 3px; font-size: 13px; color: var(--ewb-muted); }
.ewp-table .ewp-rate { min-width: 128px; padding: 10px 14px; border-radius: 999px; font-size: 15px; }
.ewp-table .ewp-rate b { font-weight: 700; white-space: nowrap; }
.ewp-na { color: #B7BFCE; }
.ewp-info { font-size: 14px; color: var(--ewb-muted); white-space: nowrap; }

/* ---------- selection bar ---------- */
.ewp-bar { position: sticky; bottom: 14px; z-index: 5; margin-top: 22px; border-radius: 22px; background: #fff; border: 1.5px solid var(--ewb-line); box-shadow: 0 24px 50px -28px rgba(var(--ewb-navy-rgb), .55); transition: border-color .2s; }
.ewp-bar.is-live { border-color: var(--ewb-accent); }
.ewp-bar-empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 20px; color: var(--ewb-muted); font-size: 14.5px; }
.ewp-bar-empty i { color: var(--ewb-accent); }
.ewp-bar-main { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; padding: 14px 16px 14px 22px; }
.ewp-bar-what { flex: 1 1 220px; min-width: 0; }
.ewp-bar-what small, .ewp-bar-total small, .ewp-step span { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ewb-muted); }
.ewp-bar-what b { display: block; font-size: 17.5px; font-weight: 700; line-height: 1.3; color: var(--ewb-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ewp-bar-what span { font-size: 13.5px; color: var(--ewb-muted); }
.ewp-steps { display: flex; gap: 18px; }
.ewp-step > div { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; }
.ewp-step button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ewb-line); background: #fff; color: var(--ewb-navy); cursor: pointer; font-size: 11px; transition: border-color .2s, color .2s, background .2s; }
.ewp-step button:hover:not(:disabled) { border-color: var(--ewb-accent); color: var(--ewb-accent); background: rgba(var(--ewb-accent-rgb), .06); }
.ewp-step button:disabled { opacity: .35; cursor: not-allowed; }
.ewp-step output { min-width: 34px; text-align: center; font-size: 17px; font-weight: 700; }
.ewp-bar-total { text-align: right; }
.ewp-bar-total b { display: block; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--ewb-accent); white-space: nowrap; }
.ewp-go.btn { height: 52px; padding: 0 28px; display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; font-size: 15.5px; font-weight: 600; white-space: nowrap; }
.ewp-go.btn-primary::before { --middle: 26px; left: -52px; width: calc(100% + 52px); transform-origin: 26px 26px; }

@media (max-width: 991px) { .ewp-title h2 { font-size: 28px; } }
@media (max-width: 767px) {
  .ewp { margin-bottom: 40px; }
  .ewp-title h2 { font-size: 25px; }
  .ewp-cards { grid-template-columns: 1fr; gap: 18px; }
  .ewp-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; width: calc(100% + 32px); }
  .ewp-filters::-webkit-scrollbar { display: none; }
  .ewp-filters button { flex: 0 0 auto; }
  /* the table turns into stacked cards */
  .ewp-tablewrap { border: 0; background: transparent; overflow: visible; }
  .ewp-table, .ewp-table tbody, .ewp-table tr, .ewp-table th, .ewp-table td { display: block; min-width: 0; }
  .ewp-table thead { display: none; }
  .ewp-table tbody tr { margin-bottom: 16px; border: 1.5px solid var(--ewb-line); border-radius: 22px; background: #fff; overflow: hidden; }
  .ewp-table tbody tr > * { border-top: 0 !important; }
  .ewp-table tbody tr:hover > * { background: transparent; }
  .ewp-table tbody tr.is-picked { border-color: var(--ewb-accent); box-shadow: 0 0 0 3px rgba(var(--ewb-accent-rgb), .16); background: #fff; }
  .ewp-table tbody tr.is-picked > * { background: transparent; }
  .ewp-table .ewp-name { padding: 18px 18px 8px; min-width: 0; }
  .ewp-table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 18px; text-align: right; }
  .ewp-table td:last-child { padding-bottom: 18px; }
  .ewp-table td::before { content: attr(data-label); font-size: 14px; font-weight: 600; color: var(--ewb-navy); text-align: left; }
  .ewp-table .ewp-rate { min-width: 130px; }
  .ewp-bar { position: static; }
  .ewp-bar-main { padding: 16px; gap: 14px; }
  .ewp-bar-total { text-align: left; flex: 1 1 100%; }
  .ewp-go.btn { width: 100%; justify-content: center; }
}

/* ======================================================================
   Booking page — package picker
   ====================================================================== */
.ewpb { margin: 0 0 22px; padding: 0 0 22px; border-bottom: 1px dashed var(--ewb-line, #E6EAF3); }
.ewpb-label { display: block; margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--ewb-navy); }
.ewpb-label small { font-weight: 500; color: var(--ewb-muted); margin-left: 6px; }
.ewpb-list { display: grid; gap: 10px; }
.ewpb-opt { position: relative; display: block; cursor: pointer; }
.ewpb-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ewpb-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border: 1.5px solid var(--ewb-line); border-radius: 18px; background: #fff; transition: border-color .18s, background .18s, box-shadow .18s; }
.ewpb-opt:hover .ewpb-card { border-color: #CBD3E3; }
.ewpb-opt input:focus-visible + .ewpb-card { box-shadow: 0 0 0 3px rgba(var(--ewb-accent-rgb), .4); }
.ewpb-opt input:checked + .ewpb-card { border-color: var(--ewb-accent); background: rgba(var(--ewb-accent-rgb), .05); box-shadow: 0 0 0 3px rgba(var(--ewb-accent-rgb), .14); }
.ewpb-thumb { flex: 0 0 58px; width: 58px; height: 58px; border-radius: 14px; background: var(--ewb-navy) center / cover no-repeat; display: grid; place-items: center; color: rgba(255, 255, 255, .5); font-size: 20px; }
.ewpb-txt { flex: 1; min-width: 0; }
.ewpb-txt b { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.3; color: var(--ewb-navy); }
.ewpb-txt small { display: block; font-size: 13px; color: var(--ewb-muted); line-height: 1.4; }
.ewpb-from { text-align: right; flex: 0 0 auto; }
.ewpb-from small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ewb-muted); }
.ewpb-from b { font-size: 15.5px; font-weight: 700; color: var(--ewb-accent); white-space: nowrap; }
.ewpb-select { width: 100%; height: 54px; padding: 0 44px 0 16px; border: 1.5px solid var(--ewb-line); border-radius: 15px; background: #FBFCFE; font: 600 15.5px var(--ewb-font); color: var(--ewb-ink); appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23FF6B00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 18px center; }
.ewpb-select:focus { outline: 0; border-color: var(--ewb-accent); background-color: #fff; box-shadow: 0 0 0 4px rgba(var(--ewb-accent-rgb), .14); }
.ewpb-rates { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ewpb-rates[hidden], .ewpb-group[hidden] { display: none; }
.ewpb-group { display: flex; flex-wrap: wrap; gap: 10px; }
.ewpb-pill { position: relative; cursor: pointer; }
.ewpb-pill input { position: absolute; opacity: 0; pointer-events: none; }
.ewpb-pill span { display: flex; flex-direction: column; min-width: 138px; padding: 11px 16px; border: 1.5px solid var(--ewb-line); border-radius: 16px; background: #fff; transition: border-color .18s, background .18s, color .18s; }
.ewpb-pill span b { font-size: 15.5px; font-weight: 700; color: var(--ewb-navy); line-height: 1.3; }
.ewpb-pill span small { font-size: 12.5px; color: var(--ewb-muted); }
.ewpb-pill:hover span { border-color: #CBD3E3; }
.ewpb-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--ewb-accent-rgb), .4); }
.ewpb-pill input:checked + span { background: var(--ewb-accent); border-color: var(--ewb-accent); }
.ewpb-pill input:checked + span b, .ewpb-pill input:checked + span small { color: #fff; }
.ewpb-pill input:checked + span small { opacity: .85; }
.ewpb-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 18px; }
.ewpb-info { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: var(--ewb-soft); font-size: 13.5px; line-height: 1.5; color: var(--ewb-navy); }
.ewpb-info i { color: var(--ewb-teal); margin-top: 2px; }
@media (max-width: 575px) {
  .ewpb-card { flex-wrap: wrap; }
  .ewpb-from { flex: 1 1 100%; text-align: left; display: flex; align-items: baseline; gap: 8px; padding-left: 72px; }
  .ewpb-pill span { min-width: 0; }
  .ewpb-pill { flex: 1 1 calc(50% - 5px); }
}
@media (prefers-reduced-motion: reduce) { .ewp-card, button.ewp-rate, .ewp-det summary::after { transition: none !important; } }
