/* Additions on top of the original compiled styles: language dropdown,
   phones / iOS, right-to-left languages. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Language dropdown in the header (replaces the RU / EN / FR list) */
.languages .lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 7px 28px 7px 12px;
  font: 600 14px/1.2 "Nunito-Sans-Bold", "Nunito Sans", system-ui, sans-serif;
  cursor: pointer;
  max-width: 150px;
  min-height: 36px;
}

.languages .lang-select:hover,
.languages .lang-select:focus-visible {
  border-color: #fff;
  outline: none;
}

.languages .lang-select option {
  color: #111;
  background: #fff;
}

@media (max-width: 800px) {
  /* Inputs below 16px make iOS Safari zoom the page when tapped */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .languages .lang-select {
    max-width: 112px;
    padding: 6px 24px 6px 10px;
    font-size: 13px;
    min-height: 34px;
    background-position: right 8px center;
  }

  /* Smaller floating chat button that respects the iPhone home indicator */
  div:has(> img[src*="/images/chat-icon.png"]) {
    transform: scale(0.62);
    transform-origin: bottom right;
  }
}

/* Arabic, Persian: right-to-left text inside the existing layout */
html[data-dir="rtl"] body :is(p, h1, h2, h3, h4, h5, li, label, span, input, textarea, select, button, a) {
  direction: rtl;
}
