/* dev-doc: 2026-11-01 22:15 front-page-language-picker */
/* RTL overrides for Arabic */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .header__inner {
  flex-direction: row;
}

[dir="rtl"] .header__aside {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .nav ul,
[dir="rtl"] .nav-utilities ul {
  flex-direction: row;
}

[dir="rtl"] .nav-utilities li {
  margin-left: 0;
  margin-right: 3rem;
}

@media (min-width: 1400px) {
  [dir="rtl"] .nav-utilities {
    right: auto;
    left: 10rem;
  }
}

[dir="rtl"] .hero__body {
  text-align: right;
}

[dir="rtl"] .hero__explainer li {
  text-align: right;
  padding-left: 0;
  padding-right: 30px;
}

[dir="rtl"] .hero__explainer li img {
  left: auto;
  right: 0;
  margin-right: 0;
  margin-left: 5px;
}

[dir="rtl"] .hero__image {
  direction: ltr;
  position: relative;
}

[dir="rtl"] .hero__actions {
  text-align: right;
}

[dir="rtl"] .hero__foot .g2 {
  text-align: right;
}

[dir="rtl"] .hero__foot .stars a {
  float: right;
}

[dir="rtl"] .hero__foot .stars + .stars {
  margin-left: 0;
  margin-right: 10px;
}

[dir="rtl"] .shape--1 {
  right: auto;
  left: -1.4rem;
}

[dir="rtl"] .shape--1 img {
  transform: scaleX(-1);
}

[dir="rtl"] .list-partners {
  direction: rtl;
}

[dir="rtl"] .section__head {
  text-align: right;
}

[dir="rtl"] .section__title {
  text-align: right;
}

[dir="rtl"] .feature__content {
  text-align: right;
}

[dir="rtl"] .service__content {
  text-align: right;
}

[dir="rtl"] .tile {
  text-align: right;
}

[dir="rtl"] .ballon {
  text-align: right;
}

[dir="rtl"] .ballon:nth-child(2) {
  right: auto;
  left: 2.5rem;
}

[dir="rtl"] .ballons-alt {
  direction: ltr;
}

[dir="rtl"] .ballon-alt {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .slider-testimonials {
  direction: ltr;
}

[dir="rtl"] .testimonial {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .plan {
  text-align: right;
}

[dir="rtl"] .plan__content ul {
  padding-right: 0;
}

[dir="rtl"] .footer__cols {
  flex-direction: row;
}

[dir="rtl"] .footer__nav ul {
  padding-right: 0;
}

[dir="rtl"] .footer__bar {
  flex-direction: row;
}

[dir="rtl"] .list-terms {
  flex-direction: row;
}

[dir="rtl"] .section__inner {
  flex-direction: row;
}

[dir="rtl"] .section-alt .section__inner {
  flex-direction: row;
}

[dir="rtl"] .section-alt--reversed .section__inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .block h4 span {
  margin-right: 0;
  margin-left: 8px;
}

[dir="rtl"] .feature-alt {
  flex-direction: row-reverse;
}

[dir="rtl"] .feature-alt .feature__content {
  margin-left: 0;
  margin-right: 20px;
}

[dir="rtl"] .feature-default .feature__content ul {
  padding-right: 0;
}

[dir="rtl"] .list-checks li {
  padding-left: 0;
  padding-right: 25px;
}

[dir="rtl"] .list-checks li::before {
  left: auto;
  right: 0;
}

/* Mobile language trigger */
.lang-mobile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-size: 2rem;
  font-weight: 500;
}

.lang-mobile-trigger img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

/* Mobile language panel */
.lang-mobile-panel {
  display: none;
}

@media (max-width: 1023px) {
  .lang-mobile-panel {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10;
    padding: 3rem 1.2rem 6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    overflow-y: auto;
  }

  .lang-mobile-panel.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
}

.lang-mobile-panel__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #2152c4;
  font-size: 1.6rem;
  font-weight: 500;
  padding: 8px 0;
  margin-bottom: 2rem;
}

/* Top-to-bottom columns like the desktop dropdown (row counts from _siteHeader.cshtml): three on phones, four from
   600px. One full-size row per language was ~3,900px of scrolling on a phone. Rows stay ~40px tall for touch. Sized
   so names fit a 360px phone's column whole (a fourth column there leaves ~85px a name); a two-word name wraps at
   its space, and break-word only splits a word that cannot fit at all ("anywhere" split "Slovenčina" mid-word). */
.lang-mobile-panel__list {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows3, 26), auto);
  grid-auto-columns: minmax(0, 1fr);
  column-gap: 4px;
  font-family: Poppins, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.lang-mobile-panel__link {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 6px 2px;
  text-decoration: none;
  color: #222;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: start;
  overflow-wrap: break-word;
  border-radius: 4px;
}

/* A bare text node can't shrink below its longest word inside the flex row, which overflowed the column. */
.lang-mobile-panel__link span {
  min-width: 0;
}

@media (max-width: 374px) {
  .lang-mobile-panel__link {
    font-size: 1.2rem;
  }
}

@media (min-width: 600px) {
  .lang-mobile-panel__list {
    grid-template-rows: repeat(var(--rows4, 22), auto);
  }
}

.lang-mobile-panel__link:active {
  background: rgba(20, 132, 214, 0.12);
}

.lang-mobile-panel__link.is-active {
  font-weight: 600;
  color: #2152c4;
}

.lang-mobile-panel__link img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Language selector */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-selector__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  color: #292d34;
  font-size: 14px;
}

.lang-selector__toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header--alt .lang-selector__toggle {
  color: #fff;
}

.header--alt .lang-selector__toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lang-selector__toggle img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

/* Same look as the /create picker (create/css/sass/main.scss .homeLangList): columns filled top to bottom, compact
   rows. Four columns (--rows4 from _siteHeader.cshtml): at ~88 languages three columns ran 30 rows, taller than a
   900px screen. Only shown on desktop (hidden-xs/sm); phones use .lang-mobile-panel. The height cap keeps the last
   rows reachable on short screens instead of below the fold. */
.lang-selector__dropdown {
  display: none;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows4, 22), auto);
  column-gap: 4px;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  padding: 6px 4px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  /* Names are in their own scripts: fonts with Cyrillic and Greek before the generic fallback. */
  font-family: Poppins, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[dir="rtl"] .lang-selector__dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-mobile-panel {
  transform: translateX(-100%);
}

[dir="rtl"] .lang-mobile-panel.is-active {
  transform: translateX(0);
}

.lang-selector:hover .lang-selector__dropdown {
  display: grid;
}

.lang-selector__dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  text-decoration: none;
  color: #222;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  border-radius: 4px;
}

.lang-selector__dropdown a:hover {
  background: rgba(20, 132, 214, 0.12);
}

.lang-selector__dropdown a.is-active {
  font-weight: 600;
  color: #1E50C3;
}

.lang-selector__dropdown a img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
