/* Hotel comparison: scoped to the search results page. */
.compare-toggle {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
  min-height: 30px;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(11, 36, 81, .15);
  border-radius: 7px;
  color: #0b2451;
  background: white;
  box-shadow: 0 4px 12px rgba(7, 26, 60, .08);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.compare-toggle:hover { border-color: #d8ad3e; background: #fff9e8; }
.compare-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.compare-toggle i { display: grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid #8793a1; border-radius: 4px; color: transparent; background: white; font-size: 11px; font-style: normal; transition: .18s ease; }
.compare-toggle input:focus-visible + i { outline: 3px solid rgba(233, 185, 73, .38); outline-offset: 2px; }
.compare-toggle input:checked + i { border-color: #0b2451; color: #0b2451; background: #e9b949; }
.compare-toggle input:checked + i::before { content: "✓"; }
.result-card.is-compared { border-color: #d3a72f; box-shadow: 0 0 0 2px rgba(233, 185, 73, .28), 0 14px 30px rgba(7, 26, 60, .12); }
.compare-media { min-width: 0; align-self: center; }
.result-image-wrap { position: relative; min-width: 0; overflow: hidden; border-radius: 8px; }
.result-image-wrap > img { display: block; width: 100%; height: 265px; border-radius: 8px; object-fit: cover; object-position: center; }
.result-list.grid-view .result-card { grid-template-rows: auto minmax(155px, 1fr) auto !important; }
.result-list.grid-view .compare-media { align-self: start; }
.result-list.grid-view .result-image-wrap > img { height: 150px; border-radius: 9px 9px 0 0; }
.result-list.grid-view .result-image-wrap { border-radius: 9px 9px 0 0; }
.result-list.grid-view .compare-toggle { width: calc(100% - 16px); margin: 8px 8px 0; }

.compare-tray {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 18px;
  width: min(1120px, calc(100% - 28px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 15px;
  color: white;
  background: #0b2451;
  box-shadow: 0 22px 55px rgba(3, 18, 44, .32);
  transform: translate(-50%, calc(100% + 40px));
  opacity: 0;
  visibility: hidden;
  transition: transform .28s ease, opacity .22s ease, visibility .22s;
}

.compare-tray.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.compare-tray-inner { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.compare-tray-copy strong { display: block; font: 700 18px "Playfair Display", serif; }
.compare-tray-copy span { display: block; margin-top: 3px; color: rgba(255, 255, 255, .65); font-size: 9px; }
.compare-tray-hotels { display: flex; min-width: 0; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.compare-tray-item { position: relative; display: grid; grid-template-columns: 39px minmax(0, 1fr); align-items: center; gap: 8px; flex: 1 0 125px; max-width: 170px; min-height: 49px; padding: 5px 27px 5px 5px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 9px; background: rgba(255, 255, 255, .08); }
.compare-tray-item img { width: 39px; height: 39px; border-radius: 6px; object-fit: cover; }
.compare-tray-item span { overflow: hidden; color: white; font-size: 9px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; }
.compare-tray-remove { position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; color: white; background: rgba(255, 255, 255, .11); font-size: 14px; cursor: pointer; }
.compare-tray-remove:hover { color: #0b2451; background: #e9b949; }
.compare-tray-actions { display: flex; align-items: center; gap: 8px; }
.compare-clear { padding: 9px 8px; border: 0; color: rgba(255, 255, 255, .72); background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.compare-clear:hover { color: white; }
.compare-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 128px; min-height: 42px; padding: 10px 15px; border: 0; border-radius: 8px; color: #0b2451; background: #e9b949; font-size: 11px; font-weight: 900; cursor: pointer; transition: .18s ease; }
.compare-open:hover:not(:disabled) { background: #f2c75d; transform: translateY(-1px); }
.compare-open:disabled { color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12); cursor: not-allowed; }

.compare-toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  bottom: 105px;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: #b83232;
  box-shadow: 0 10px 30px rgba(43, 11, 11, .25);
  font-size: 11px;
  font-weight: 800;
  transform: translate(-50%, 15px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.compare-toast.show { transform: translate(-50%, 0); opacity: 1; }

.compare-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 18, 44, .72);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
}
.compare-modal.is-open { opacity: 1; visibility: visible; }
.compare-dialog { display: flex; flex-direction: column; width: min(1260px, 100%); max-height: calc(100vh - 48px); overflow: hidden; border-radius: 16px; background: #f5f7fa; box-shadow: 0 28px 80px rgba(0, 0, 0, .34); transform: translateY(12px) scale(.985); transition: transform .22s ease; }
.compare-modal.is-open .compare-dialog { transform: translateY(0) scale(1); }
.compare-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 21px; color: white; background: #0b2451; }
.compare-dialog-header span { color: #e9b949; font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.compare-dialog-header h2 { margin: 3px 0 0; font: 700 25px "Playfair Display", serif; }
.compare-dialog-close { display: grid; place-items: center; width: 37px; height: 37px; padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; color: white; background: rgba(255, 255, 255, .08); font-size: 23px; cursor: pointer; }
.compare-dialog-close:hover { color: #0b2451; background: #e9b949; }
.compare-scroll { overflow: auto; padding: 18px; }
.compare-matrix { display: grid; grid-template-columns: 145px repeat(var(--compare-count), minmax(205px, 1fr)); min-width: calc(145px + (var(--compare-count) * 205px)); border: 1px solid #dce2e9; border-radius: 12px; background: white; box-shadow: 0 8px 24px rgba(7, 26, 60, .06); }
.compare-cell { min-width: 0; padding: 13px; border-right: 1px solid #e6e9ee; border-bottom: 1px solid #e6e9ee; color: #536171; font-size: 10px; line-height: 1.5; }
.compare-cell:nth-child(calc(var(--compare-count) + 1n)) { border-right: 1px solid #e6e9ee; }
.compare-label { position: sticky; left: 0; z-index: 3; color: #0b2451; background: #f7f9fb; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.compare-pin-hotel,.compare-pin-price,.compare-pin-offers { position: sticky; z-index: 10; background: #fff; }
.compare-label.compare-pin-hotel,.compare-label.compare-pin-price,.compare-label.compare-pin-offers { z-index: 12; background: #f7f9fb; }
.compare-pin-hotel { top: 0; min-height: 55px; }
.compare-pin-price { top: 55px; min-height: 100px; }
.compare-pin-offers { top: 155px; min-height: 55px; box-shadow: 0 8px 13px rgba(7,26,60,.08); }
.compare-hotel-head { position: relative; padding: 0; overflow: hidden; background: white; }
.compare-gallery-wrap { position: relative; }
.compare-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.compare-gallery::-webkit-scrollbar { display: none; }
.compare-gallery img { flex: 0 0 100%; width: 100%; height: 260px; object-fit: cover; scroll-snap-align: start; }
.compare-gallery-nav { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #0b2451; background: rgba(255, 255, 255, .85); box-shadow: 0 4px 10px rgba(7, 26, 60, .22); font-size: 17px; line-height: 1; cursor: pointer; transform: translateY(-50%); transition: background .15s ease, transform .15s ease; }
.compare-gallery-nav:hover { background: #e9b949; transform: translateY(-50%) scale(1.06); }
.compare-gallery-nav.prev { left: 8px; }
.compare-gallery-nav.next { right: 8px; }
.compare-gallery-dots { position: absolute; left: 50%; bottom: 9px; z-index: 2; display: flex; gap: 5px; transform: translateX(-50%); }
.compare-gallery-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(11, 36, 81, .25); cursor: pointer; transition: background .15s ease, width .15s ease; }
.compare-gallery-dot.is-active { width: 16px; border-radius: 3px; background: #e9b949; }
.compare-hotel-copy { padding: 0; }
.compare-hotel-copy h3 { margin: 0; color: #0b2451; font: 700 18px "Playfair Display", serif; line-height: 1.2; }
.compare-head-remove { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; color: #0b2451; background: rgba(255, 255, 255, .94); box-shadow: 0 4px 12px rgba(7, 26, 60, .16); font-size: 16px; cursor: pointer; }
.compare-head-remove:hover { background: #e9b949; }
.compare-price { color: #0b2451; font: 700 25px "Playfair Display", serif; }
.compare-price small { display: block; color: #7a838e; font: 500 8px "DM Sans", sans-serif; }
.compare-rating { display: inline-flex; align-items: center; gap: 7px; }
.compare-rating b { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 7px; border-radius: 7px 7px 7px 0; color: white; background: #0b2451; font-size: 12px; }
.compare-rating > span { display: grid; gap: 1px; }
.compare-rating > span strong { color: #0b2451; font-size: 10px; }
.compare-rating > span small { color: #6f7b89; font-size: 8px; font-weight: 700; }
.compare-no-reviews { color: #7c8794; font-size: 9px; font-weight: 700; }
.compare-price-summary { position: relative; display: grid; justify-items: start; gap: 3px; min-height: 72px; padding-right: 48px; }
.compare-price-percent { position: absolute; top: 0; right: 0; padding: 5px 7px; border-radius: 999px; color: #fff; background: #e0192f; box-shadow: 0 3px 10px rgba(224,25,47,.25); font-size: 8px; font-weight: 900; line-height: 1; letter-spacing: .03em; white-space: nowrap; }
.compare-price-saving { padding: 3px 6px; border-radius: 4px; color: #17643d; background: #e4f4ea; font-size: 8px; font-weight: 900; }
.compare-price-summary s { color: #8b939d; font-size: 9px; }
.compare-final-label { color: #687586; font-size: 7px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.compare-price-summary > strong { color: #0b2451; font: 700 25px "Playfair Display", serif; line-height: 1.05; }
.compare-price-summary > small { color: #7a838e; font-size: 8px; font-weight: 600; line-height: 1.35; }
.compare-stars { color: #d79d12; font-size: 13px; letter-spacing: 1px; }
.compare-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.compare-chips span { padding: 4px 6px; border: 1px solid #d8e3ee; border-radius: 999px; color: #31516f; background: #f4f8fc; font-size: 8px; font-weight: 700; }
.compare-availability { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.compare-availability i { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: white; font-size: 12px; font-style: normal; line-height: 1; }
.compare-availability.is-available { color: #17643d; }
.compare-availability.is-available i { background: #248454; }
.compare-availability.is-unavailable { color: #a13b3b; }
.compare-availability.is-unavailable i { background: #c64a4a; }
.compare-benefits { display: grid; gap: 5px; color: #247347; }
.compare-benefits span::before { content: "✓"; margin-right: 5px; color: #d79d12; font-weight: 900; }
.compare-saving { color: #17643d; font-weight: 800; }
.compare-offers { display: flex; flex-wrap: wrap; gap: 6px; }
.compare-offer { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 6px 9px; border-radius: 999px; color: #fff; background: #e0192f; box-shadow: 0 4px 12px rgba(224,25,47,.24); font-size: 9px; font-weight: 900; line-height: 1.25; letter-spacing: .025em; text-transform: uppercase; }
.compare-offer i { display: grid; place-items: center; flex: 0 0 14px; width: 14px; height: 14px; font-style: normal; }
.compare-offer i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.compare-offer:not(.is-advance) i svg circle { fill: currentColor; stroke: none; }
.compare-offer small { padding-left: 5px; border-left: 1px solid rgba(255,255,255,.45); color: #fff; font-size: 7px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.compare-offer.is-direct { color: #17643d; background: #e4f4ea; box-shadow: none; }
.compare-offer.is-direct i { display: none; }
.compare-typical { display: block; margin-top: 6px; color: #7a838e; font-size: 8px; }
.compare-services { display: grid; gap: 6px; }
.compare-service { display: flex; align-items: center; gap: 7px; min-width: 0; color: #247347; }
.compare-service > i { display: grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; color: #247347; font-style: normal; }
.compare-service > i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.compare-service > span { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.compare-service b { color: #384b61; font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; }
.compare-service small { flex: 0 0 auto; color: #247347; font-size: 8px; font-weight: 900; }
.compare-service.is-menu > i { color: #9b7415; }
.compare-service.is-menu small { color: #9b7415; }
.compare-no-services { color: #8a949f; font-size: 9px; }
.compare-deal-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 8px 8px 8px 14px; border-radius: 8px; border: 1px solid #183b73; color: #fff; background: #0b2451; text-decoration: none; box-shadow: 0 5px 13px rgba(11,36,81,.18); transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.compare-deal-link span { color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .01em; }
.compare-deal-link b { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 6px; background: #f4c542; color: #0b2451; box-shadow: none; }
.compare-deal-link b svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.compare-deal-link:hover { background: #123365; box-shadow: 0 8px 18px rgba(11,36,81,.26); transform: translateY(-1px); }
.compare-deal-link:hover b { background: #ffd75e; }
.compare-empty-label { min-height: 160px; }
body.compare-lock { overflow: hidden; }

@media (max-width: 900px) {
  .result-image-wrap > img { height: 235px; }
  .compare-tray-inner { grid-template-columns: 145px minmax(0, 1fr) auto; }
  .compare-tray-copy strong { font-size: 16px; }
  .compare-clear { display: none; }
}

@media (max-width: 650px) {
  .result-image-wrap > img { height: 265px; border-radius: 8px; }
  .compare-tray { bottom: 8px; width: calc(100% - 16px); padding: 10px; }
  .compare-tray-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
  .compare-tray-copy { grid-column: 1; }
  .compare-tray-copy strong { font-size: 15px; }
  .compare-tray-hotels { grid-column: 1 / -1; grid-row: 2; }
  .compare-tray-actions { grid-column: 2; grid-row: 1; }
  .compare-open { min-width: 105px; min-height: 38px; padding: 8px 11px; }
  .compare-tray-item { flex-basis: 118px; }
  .compare-modal { padding: 10px; }
  .compare-dialog { max-height: calc(100vh - 20px); }
  .compare-dialog-header { padding: 14px 16px; }
  .compare-dialog-header h2 { font-size: 21px; }
  .compare-scroll { padding: 10px; }
  .compare-matrix { grid-template-columns: 105px repeat(var(--compare-count), minmax(185px, 1fr)); min-width: calc(105px + (var(--compare-count) * 185px)); }
  .compare-gallery img { height: 195px; }
  .compare-gallery-nav { width: 26px; height: 26px; font-size: 15px; }
  .compare-cell { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .compare-tray, .compare-modal, .compare-dialog, .compare-toggle i { transition: none; }
}
