/* RB5921: scoped overlay fixes; supplier prices, logo and existing behaviors are untouched. */
@media (max-width: 680px) {
  /* 5920's minmax(0,1fr) put all spare card height between details and price. */
  html.rb5920-enhanced .hotel-card-main {
    grid-template-rows: auto auto !important;
    align-content: center !important;
    row-gap: 6px !important;
    min-height: 0 !important;
  }
  html.rb5920-enhanced .hotel-image {
    height: clamp(144px, 39vw, 160px) !important;
    max-height: none !important;
  }
  html.rb5920-enhanced .hotel-content {
    align-self: end !important;
  }
  html.rb5920-enhanced .hotel-price {
    align-self: start !important;
    padding-top: 5px !important;
  }
  html.rb5920-enhanced .hotel-price .price-amount { line-height: 1.12 !important; }

  /* Chatbot's own @media rule forces width/height 100dvh. Override it. */
  .rb-chat {
    position: fixed !important;
    inset: auto 9px calc(64px + env(safe-area-inset-bottom)) 9px !important;
    width: auto !important;
    height: min(70dvh, 560px) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom)) !important;
    border: 1px solid #dce4ef !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 50px rgba(12,35,68,.22) !important;
  }
  .rb-chat .rb-chat-head { flex: 0 0 auto !important; padding: 11px 14px !important; }
  .rb-chat .rb-chat-content { min-height: 0 !important; overflow-y: auto !important; overscroll-behavior: contain; }
  .rb-chat .rb-chat-minimize {
    display: grid !important; place-items: center !important;
    width: 42px !important; height: 42px !important; flex: 0 0 42px !important;
    border: 1px solid #a9bdd9 !important; border-radius: 12px !important;
    background: #edf5ff !important; color: #103c78 !important;
    font-size: 29px !important; font-weight: 600 !important; line-height: 1 !important;
    opacity: 1 !important; visibility: visible !important;
  }

  /* Four hotel information tabs: no clipped-off 'Room facilities' tab. */
  .hotel-tabs .hotel-tab-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important; overflow: visible !important;
    border-bottom: 0 !important;
    margin-bottom: 12px !important;
  }
  .hotel-tabs .hotel-tab-button {
    display: flex !important; justify-content: center !important;
    align-items: center !important; white-space: normal !important;
    text-align: center !important; min-width: 0 !important; min-height: 44px !important;
    border: 1px solid #d9e5f2 !important; border-radius: 10px !important;
    padding: 9px 7px !important; font-size: 12px !important; line-height: 1.2 !important;
    color: #305070 !important; background: #fff !important;
  }
  .hotel-tabs .hotel-tab-button.active {
    background: #e9f2ff !important; border-color: #0756b7 !important;
    color: #064d9c !important; box-shadow: inset 0 -2px #0756b7;
  }
}

/* Nationality modal is usable on large screens too; native select remains source of truth. */
.rb5921-nationality-host { position: relative !important; }
.rb5921-native-select {
  position: absolute !important; width: 1px !important; height: 1px !important;
  min-width: 1px !important; min-height: 1px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important;
  overflow: hidden !important; opacity: 0 !important; pointer-events: none !important;
}
.rb5921-nationality-button {
  box-sizing: border-box !important; display: flex !important; align-items: center !important;
  justify-content: space-between !important; width: 100% !important; min-height: 46px !important;
  gap: 12px !important; border: 1px solid #ccd8e8 !important; border-radius: 9px !important;
  padding: 10px 13px !important; color: #172a43 !important; background: #fff !important;
  font: inherit !important; font-size: 16px !important; text-align: left !important;
  cursor: pointer !important;
}
.rb5921-nationality-button:focus-visible, .rb5921-country-search:focus-visible {
  outline: 3px solid #76a8fa !important; outline-offset: 2px !important;
}
.rb5921-nationality-button .rb5921-country-value {
  overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important;
}
.rb5921-country-chevron { color: #537196 !important; flex: 0 0 auto !important; }
body.rb5921-picker-open { overflow: hidden !important; }
.rb5921-country-overlay {
  position: fixed !important; inset: 0 !important; display: grid !important; place-items: center !important;
  box-sizing: border-box !important; padding: 16px !important;
  background: rgba(14,27,48,.57) !important; z-index: 999999 !important;
}
.rb5921-country-overlay[hidden] { display: none !important; }
.rb5921-country-dialog {
  display: flex !important; flex-direction: column !important;
  width: min(440px,100%) !important; max-height: min(76dvh,680px) !important;
  box-sizing: border-box !important; border-radius: 18px !important;
  background: #fff !important; box-shadow: 0 20px 70px rgba(0,0,0,.25) !important;
  padding: 15px !important; color: #152d4e !important;
}
.rb5921-country-top { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 9px !important; margin-bottom: 12px !important; }
.rb5921-country-top strong { font-size: 18px !important; line-height: 1.3 !important; }
.rb5921-country-close { flex: 0 0 42px !important; height: 42px !important; border: 1px solid #d9e2ef !important; border-radius: 10px !important; background: #f3f7fc !important; color: #18395e !important; font-size: 26px !important; cursor: pointer !important; }
.rb5921-country-search { box-sizing: border-box !important; width: 100% !important; height: 45px !important; border: 1px solid #aabed6 !important; border-radius: 10px !important; padding: 10px 12px !important; font-size: 16px !important; background: #fff !important; color: #152d4e !important; }
.rb5921-country-list { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; overscroll-behavior: contain !important; margin-top: 9px !important; }
.rb5921-country-option { display: block !important; width: 100% !important; border: 0 !important; border-bottom: 1px solid #ecf0f5 !important; border-radius: 0 !important; padding: 12px 9px !important; color: #203c5f !important; background: #fff !important; font-size: 15px !important; font-weight: 500 !important; text-align: left !important; cursor: pointer !important; }
.rb5921-country-option[aria-selected="true"] { background: #eaf3ff !important; color: #0752aa !important; font-weight: 800 !important; }
.rb5921-country-option:focus-visible { outline: 2px solid #2570cd !important; outline-offset: -3px !important; }
.rb5921-country-none { padding: 16px 8px !important; color: #64748b !important; font-size: 14px !important; }
@media (max-width: 680px) {
  .rb5921-country-overlay { align-items: end !important; padding: 0 !important; }
  .rb5921-country-dialog { width: 100% !important; max-height: 78dvh !important; border-radius: 18px 18px 0 0 !important; padding: 15px 15px max(15px,env(safe-area-inset-bottom)) !important; }
}
