/* =====================================================================
   Beyond Journey - Hotel recommendations popup (hotels.html)
   ---------------------------------------------------------------------
   SEARCH on the hotel page opens this over the page itself - the banner
   and search panel stay visible, blurred, behind it - rather than
   sending the visitor to a second page: five stays ranked against what
   they typed, "View details" on each, "View more" for the next five,
   and a way through to the full list with filters.

   Self-contained: hotels.html does not load bj-booking.css, so the
   tokens this needs are declared here on .bjhr. Everything is prefixed
   bjhr- so it cannot collide with the search panel's own classes.
   Built and driven by js/bj-hotel-reco.js.
   ===================================================================== */
.bjhr {
  --navy: #17233e; --navy-700: #22315a;
  --orange: #f5761a; --orange-600: #dd660f;
  --ink: #17233e; --muted: #56607a; --faint: #8a93a8;
  --line: #e7e6e1; --line-soft: #f0efea; --canvas: #f7f6f2;
  --ok: #1a7f4b; --ok-bg: #edf8f1; --ok-line: #bfe3cd; --warn: #9a6b00;
  --ease: cubic-bezier(.4, 0, .2, 1);

  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .28s var(--ease), visibility 0s linear .28s;
}
.bjhr.is-open { opacity: 1; visibility: visible; transition: opacity .28s var(--ease); }
body.bjhr-lock { overflow: hidden; }

/* the page shows through, softened: a blur under a navy tint */
.bjhr__backdrop {
  position: absolute; inset: 0;
  background: rgba(23, 35, 62, .55);
  -webkit-backdrop-filter: blur(10px) saturate(.9);
  backdrop-filter: blur(10px) saturate(.9);
}

.bjhr__panel {
  position: relative; z-index: 1;
  width: min(1240px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--canvas); border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(11, 17, 32, .7);
  transform: translateY(16px) scale(.98);
  transition: transform .32s var(--ease);
}
.bjhr.is-open .bjhr__panel { transform: none; }

/* ---------------------------------------------------------------
   Head - what was searched, restated so the cards have context
   --------------------------------------------------------------- */
.bjhr__head {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  padding: 16px 64px 14px 22px;          /* room on the right for the close button */
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff; border-bottom: 3px solid var(--orange);
}
.bjhr__head-txt { flex: 1 1 360px; min-width: 0; }
.bjhr__kicker {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(245, 118, 26, .18); color: #ffb072;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.bjhr__head h2 {
  margin: 6px 0 3px; font-size: 20px; font-weight: 800; line-height: 1.2;
  color: #fff; text-transform: none; letter-spacing: 0;
}
.bjhr__head h2 span { color: var(--orange); }
.bjhr__sub { margin: 0; font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, .72); }
.bjhr__chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: center; max-width: 520px; }
.bjhr__chips span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap;
}
.bjhr__chips span i, .bjhr__chips span svg { color: var(--orange); font-size: 10.5px; }
.bjhr__x {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px;
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s var(--ease);
}
.bjhr__x:hover { background: var(--orange); }

/* ---------------------------------------------------------------
   Body
   --------------------------------------------------------------- */
.bjhr__body { overflow-y: auto; padding: 16px 22px 6px; -webkit-overflow-scrolling: touch; }
.bjhr__notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 14px; padding: 10px 13px; border-radius: 10px;
  background: #eef3fb; border: 1px solid #cbd9ef; color: #24395f;
  font-size: 12.5px; line-height: 1.5;
}
.bjhr__notice i, .bjhr__notice svg { margin-top: 2px; color: #3b5b95; flex: none; }
.bjhr__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.bjhr__empty {
  grid-column: 1 / -1; text-align: center; padding: 40px 16px;
  background: #fff; border: 1px dashed var(--line); border-radius: 12px;
  color: var(--muted); font-size: 14px; line-height: 1.6;
}
.bjhr__empty a { color: var(--orange); font-weight: 700; }

/* ---------------------------------------------------------------
   Card - compact on purpose: a photo, one line of place and score,
   the name, one line of facts, three one-word amenities, the price
   and a small button. Nothing wraps past a second line.
   --------------------------------------------------------------- */
.bjhr-card {
  display: flex; flex-direction: column; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 35, 62, .05);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  animation: bjhrIn .35s var(--ease) both;
}
.bjhr-card:hover {
  transform: translateY(-3px); border-color: rgba(245, 118, 26, .45);
  box-shadow: 0 14px 28px -14px rgba(23, 35, 62, .3);
}
@keyframes bjhrIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.bjhr-card__media {
  position: relative; display: block; aspect-ratio: 16 / 10;
  background: var(--line-soft); overflow: hidden;
}
.bjhr-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.bjhr-card:hover .bjhr-card__media img { transform: scale(1.05); }
.bjhr-card__match {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-600)); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 3px 10px -3px rgba(245, 118, 26, .7);
}
.bjhr-card__match i, .bjhr-card__match svg { font-size: 8px; }
.bjhr-card__rank {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: var(--navy); font-size: 10px; font-weight: 800;
}

.bjhr-card__body { padding: 9px 11px 6px; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bjhr-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
/* block, not flex: a flex box will not put an ellipsis on a bare text
   node, so a long place name was simply cut off */
.bjhr-card__loc {
  display: block; min-width: 0;
  font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bjhr-card__loc i, .bjhr-card__loc svg { color: var(--orange); font-size: 9.5px; margin-right: 4px; }
.bjhr-card__score {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 5px;
  background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 800;
}
.bjhr-card__score i, .bjhr-card__score svg { color: #ffc107; font-size: 8.5px; }
.bjhr-card__name {
  margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.25; color: var(--ink);
  text-transform: none; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bjhr-card__name a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
.bjhr-card__name a:hover { color: var(--orange); }
.bjhr-card__meta {
  margin: 0; font-size: 10.5px; color: var(--faint); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bjhr-card__amen { display: flex; gap: 4px; margin-top: 3px; overflow: hidden; }
.bjhr-card__amen span {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 2px 6px; border-radius: 5px;
  background: var(--canvas); border: 1px solid var(--line-soft);
  font-size: 10px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.bjhr-card__amen span i, .bjhr-card__amen span svg { font-size: 9px; color: var(--navy); }

/* why it was picked - green is a match against the search, amber a
   candid miss, grey a fact about the stay */
.bjhr-card__why {
  display: block; margin: 3px 0 0;
  font-size: 10.5px; font-weight: 600; line-height: 1.35; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bjhr-card__why i, .bjhr-card__why svg { font-size: 9.5px; margin-right: 5px; color: var(--faint); }
.bjhr-card__why.ok, .bjhr-card__why.ok i, .bjhr-card__why.ok svg { color: var(--ok); }
.bjhr-card__why.warn, .bjhr-card__why.warn i, .bjhr-card__why.warn svg { color: var(--warn); }

.bjhr-card__foot {
  margin-top: auto; padding: 7px 11px 10px;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
}
.bjhr-card__price { min-width: 0; line-height: 1.2; }
.bjhr-card__price em {
  display: inline-block; margin-bottom: 3px;
  font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .03em; color: var(--orange);
  background: rgba(245, 118, 26, .12); border: 1px solid rgba(245, 118, 26, .3);
  padding: 1px 5px; border-radius: 4px;
}
.bjhr-card__price div { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.bjhr-card__price del { font-size: 10px; color: var(--faint); }
.bjhr-card__price strong { font-size: 15.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.bjhr-card__price small { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }
.bjhr-card__cta {
  flex: none; padding: 6px 11px; border-radius: 6px;
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; text-decoration: none;
  white-space: nowrap; transition: background .2s var(--ease), transform .2s var(--ease);
}
.bjhr-card__cta:hover { background: var(--orange); color: #fff; transform: translateY(-1px); }

/* ---------------------------------------------------------------
   Buttons under the grid
   --------------------------------------------------------------- */
.bjhr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border: 0; border-radius: 999px;
  font-family: inherit; font-size: 13.5px; font-weight: 800; letter-spacing: .2px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease),
              color .22s var(--ease), border-color .22s var(--ease);
}
.bjhr-btn--navy { background: var(--navy); color: #fff; box-shadow: 0 6px 18px -6px rgba(23, 35, 62, .5); }
.bjhr-btn--navy:hover { color: #fff; transform: translateY(-2px); }
.bjhr-btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.bjhr-btn--ghost:hover { border-color: var(--orange); color: var(--orange); }
.bjhr [hidden] { display: none !important; }
.bjhr__more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0 14px; }
.bjhr__more-lead { margin: 0; max-width: 560px; text-align: center; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* the heading over the second and third batch - the orange rule the
   original popup used, so a new set reads as a new set */
.bjhr__batch {
  grid-column: 1 / -1; margin-top: 6px;
  padding: 2px 0 2px 12px; border-left: 4px solid var(--orange);
}
.bjhr__batch h4 {
  margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ink);
  text-transform: none; letter-spacing: 0;
}
.bjhr__batch h4 i, .bjhr__batch h4 svg { color: var(--orange); margin-right: 7px; font-size: 13px; }
.bjhr__batch p { margin: 2px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }

/* ---------------------------------------------------------------
   Foot
   --------------------------------------------------------------- */
.bjhr__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px 22px; background: #fff; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.bjhr__foot span { display: inline-flex; align-items: center; gap: 7px; }
.bjhr__foot span i, .bjhr__foot span svg { color: var(--ok); }
.bjhr__foot a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--orange); font-weight: 700; text-decoration: none; cursor: pointer;
}
.bjhr__foot a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 1199px) { .bjhr__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .bjhr { padding: 0; align-items: flex-end; }
  .bjhr__panel { max-height: 100vh; max-height: 100dvh; border-radius: 18px 18px 0 0; }
  /* on a phone the head is a title and one scrolling row of chips; the
     explanatory line would push the first card below the fold */
  .bjhr__head { padding: 14px 52px 12px 16px; gap: 10px; }
  .bjhr__head h2 { font-size: 17px; margin-bottom: 0; }
  .bjhr__sub { display: none; }
  .bjhr__chips {
    max-width: none; width: 100%; flex-wrap: nowrap; overflow-x: auto;
    padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .bjhr__chips::-webkit-scrollbar { display: none; }
  .bjhr__x { top: 12px; right: 12px; }
  .bjhr__body { padding: 12px 14px 6px; }
  .bjhr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bjhr__foot { padding: 9px 16px; }
}
@media (max-width: 479px) { .bjhr__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .bjhr, .bjhr__panel, .bjhr-card { transition: none; animation: none; }
  .bjhr-card:hover, .bjhr-card:hover .bjhr-card__media img { transform: none; }
}
