/* Layout repair after AI assistant pilot + blocked images (2026-11-26) */

/* Gallery: don't depend on absolute fill when photo fails to load */
body.network-catalog .catalog-gallery {
  position: relative !important;
  min-height: 280px !important;
  height: auto !important;
  background: #e3ece4 !important;
}

body.network-catalog .catalog-gallery > a {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  height: auto !important;
  min-height: 280px !important;
}

body.network-catalog .catalog-gallery img {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: 280px !important;
  object-fit: cover !important;
}

body.network-catalog .catalog-gallery figcaption {
  position: absolute !important;
  bottom: 14px !important;
  left: 14px !important;
  z-index: 2 !important;
}

@media (max-width: 760px) {
  body.network-catalog .catalog-gallery,
  body.network-catalog .catalog-gallery > a {
    min-height: 220px !important;
  }
  body.network-catalog .catalog-gallery img {
    height: 220px !important;
  }
}

/* Holiday inset: clear vertical stack, no text overlap */
body.network-catalog .catalog-summary {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.network-catalog .catalog-summary a.holiday-feature {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  position: static !important;
  height: auto !important;
  overflow: visible !important;
  line-height: 1.4 !important;
}

body.network-catalog .holiday-feature .holiday-feature-title,
body.network-catalog .holiday-feature .holiday-feature-detail,
body.network-catalog .holiday-feature .holiday-feature-note,
body.network-catalog .holiday-feature .holiday-feature-action,
body.network-catalog .holiday-feature > div {
  display: block !important;
  position: static !important;
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  white-space: normal !important;
}

/* Keep seasonal fallback line hidden until JS reveals it */
body.network-catalog .holiday-feature .holiday-price-expired[hidden],
body.network-catalog .holiday-feature [hidden] {
  display: none !important;
}

body.network-catalog .holiday-feature .holiday-feature-detail {
  margin-top: 2px !important;
}

body.network-catalog .holiday-feature .holiday-feature-note {
  margin-top: 2px !important;
}

body.network-catalog .holiday-feature .holiday-feature-action {
  margin-top: 4px !important;
}

/* Payment method labels stay readable if icons fail */
body.network-catalog .pay26-brand,
body.network-catalog .sp-method {
  min-height: 48px !important;
  gap: 8px !important;
}

body.network-catalog .pay26-brand img,
body.network-catalog .sp-method img,
body.network-catalog .pay26-brand .pay-icon,
body.network-catalog .sp-method .pay-icon {
  flex: 0 0 auto !important;
  width: 30px !important;
  height: 30px !important;
  max-width: 72px !important;
  object-fit: contain !important;
}

body.network-catalog .pay26-brand span,
body.network-catalog .sp-method span {
  position: static !important;
  display: inline-block !important;
  white-space: normal !important;
  line-height: 1.25 !important;
}

/* Room / treatment photos keep a calm frame when missing */
body.network-catalog .room-card img,
body.network-catalog .photo-grid img,
body.network-catalog .nature-card img,
body.network-catalog figure img {
  background: #e8efe9;
}

/* Keep CRM assistant above the mobile call/request bar */
body .mobile-actions ~ .sa-launcher,
body .sa-launcher {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
}

body .sa-panel {
  bottom: calc(152px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (min-width: 761px) {
  body .sa-launcher {
    bottom: 20px !important;
  }
  body .sa-panel {
    bottom: 84px !important;
  }
}

/* Details / FAQ stay clickable above overlays */
body.network-catalog details > summary {
  position: relative;
  z-index: 1;
  cursor: pointer;
}

/* Price heading: keep category select inside the block */
body.network-catalog .compact-price-heading {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

body.network-catalog .compact-price-heading > div {
  flex: 1 1 280px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body.network-catalog .compact-price-heading .price-filter {
  flex: 0 1 220px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  position: static !important;
  float: none !important;
}

body.network-catalog .compact-price-heading .price-filter select,
body.network-catalog .price-filter select {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Payment / trip blocks must not sit inside the heading row */
body.network-catalog .compact-price-heading > .sp-pay-everywhere,
body.network-catalog .compact-price-heading > .network-trip-selection {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* When AI assistant is on the page, hide competing floaters */
body:has(.sa-launcher) .direct-booking-fixed,
body:has(.sa-root) .direct-booking-fixed,
body:has(.sa-launcher) .direct-booking-cta.direct-booking-fixed,
body:has(.sa-launcher) .ua-launch,
body:has(.sa-launcher) .assist2-launch,
body:has(.sa-launcher) .resort-help-launch,
body:has(.sa-launcher) #resort-help-panel,
body:has(.sa-launcher) .resort-help-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
