/* Native <select> inherits the site's light text; the OS dropdown is white. */
select.language-switcher,
select.language-switcher:focus,
select.language-switcher:focus-visible {
  color: #f2f4ef;
  background-color: #0d1418;
}

select.language-switcher option,
select.language-switcher optgroup {
  color: #141414 !important;
  background-color: #ffffff !important;
}

select.language-switcher option:checked,
select.language-switcher option:hover,
select.language-switcher option:focus {
  color: #141414 !important;
  background-color: #d9e4ff !important;
}

html, body {
  overflow-x: clip;
}

select.language-switcher,
select.locale-select {
  min-height: 44px;
  min-width: 7.5rem;
  max-width: min(42vw, 11rem);
  padding: 0.35rem 0.55rem;
  font-size: 16px;
  border: 1px solid #505443;
  border-radius: 3px;
}

.chat-fab,
.messages-link--floating {
  right: max(16px, env(safe-area-inset-right)) !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
  min-height: 52px !important;
  min-width: 52px;
  padding: 14px 18px !important;
  font-size: 16px !important;
}

.crm-ios-hint {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #171e1d;
  color: #e8d4ae;
  border: 1px solid #a89169;
  font-size: 14px;
  line-height: 1.4;
}

.crm-ios-hint p {
  margin: 0;
  flex: 1;
}

.crm-ios-hint button {
  min-height: 40px;
  padding: 0 12px;
  color: #0b0f14;
  background: #d4b67c;
  border: 0;
  font: inherit;
}

@media (max-width: 850px) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  select.language-switcher,
  .header-inner .language-switcher,
  .header-inner .locale-select {
    display: inline-block !important;
    max-width: min(46vw, 12rem);
  }

  .hero-actions .hero-apply,
  .hero-actions .primary-link,
  .chat-cta,
  .period-option,
  .country-picker button {
    min-height: 48px;
  }

  .calculator-layout,
  .offer-facts,
  .offer-perks,
  .offer-entry,
  .apply-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  input, select, textarea, button {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .chat-nudge {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
  }

  html[dir=rtl] .chat-fab,
  html[dir=rtl] .messages-link--floating {
    right: auto !important;
    left: max(16px, env(safe-area-inset-left)) !important;
  }
}
