.ct-sticky-container.rn-switcher-overlay-on,
.ct-panel.ct-header.rn-switcher-overlay-on,
.ct-header.rn-switcher-overlay-on {
  z-index: 1000001 !important;
}

.ct-sticky-container.rn-switcher-overlay-on {
  position: relative;
}

.rn-switcher {
  position: relative;
  display: inline-block;
  max-width: 100%;
  font-family: inherit;
}

.rn-switcher,
.rn-switcher *,
.rn-switcher *::before,
.rn-switcher *::after {
  box-sizing: border-box;
}

.rn-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  max-width: 100%;
  min-width: 0;
    padding: 5px 14px;
    border: none;
    border-radius: 25px;
    background: var(--theme-palette-color-2);
    color: #fff;
    font-size: 14px;
    text-transform: none;
    cursor: pointer;
}

.rn-switcher--menu .rn-switcher__trigger {
  gap: 8px;
  padding: 4px 6px;
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.rn-switcher--menu .rn-switcher__trigger:hover,
.rn-switcher--menu .rn-switcher__trigger:focus-visible {
  background: rgba(15, 23, 42, 0.06);
}

.rn-switcher--menu .rn-switcher__label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rn-switcher--menu .rn-switcher__chevron svg.ct-icon {
  fill: currentColor;
}

.rn-switcher__chevron {
  display: flex;
  flex-shrink: 0;
}
.rn-switcher__chevron svg.ct-icon {
  height: 12px;
  width: 12px;
  fill: #fff;
}

.rn-switcher__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rn-switcher__flag {
  /* width: 20px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center; */
}

.rn-switcher__flag svg {
  width: 20px;
  height: 100%;
  /* border-radius: 2px; */
  display: block;
}

.rn-select2-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rn-select2-text {
  min-width: 0;
}

.rn-select2-flag {
  width: 20px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rn-select2-flag img,
.rn-select2-flag svg {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  display: block;
}

.rn-switcher__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
}
.rn-switcher__overlay[hidden] {
  display: none !important;
}

.rn-switcher__panel {
  width: 320px;
  max-width: 90vw;
  background: #f5f5f5;
  height: 100%;
  padding: 38px 24px 32px;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overflow-x: hidden;
}

.rn-switcher--inline {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.rn-switcher--inline .rn-switcher__panel {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
  border-radius: clamp(18px, 4vw, 24px);
  border: 1px solid rgba(111, 93, 71, 0.16);
  background: #fffdf9;
  box-shadow: 0 18px 50px rgba(43, 31, 18, 0.1);
  padding: clamp(20px, 4vw, 30px);
  gap: 16px;
  font-family: inherit;
}

.rn-switcher__subtitle {
  margin: -8px 0 4px;
  color: #51607f;
  font-size: 15px;
}

.rn-switcher--inline .rn-switcher__subtitle {
  max-width: 36ch;
  margin: -4px auto 2px;
  color: #6f5d47;
  line-height: 1.45;
  text-align: center;
}

body.rn-main-switcher-page {
  --rn-heading: #2c241b;
  --rn-text: #433629;
  --rn-text-soft: #766655;
  --rn-accent: #9a7a52;
  --rn-accent-strong: #6a4d2d;
  --rn-panel-border: rgba(111, 93, 71, 0.16);
  --rn-field-bg: #ffffff;
  --rn-field-border: rgba(111, 93, 71, 0.22);
  --rn-field-border-active: rgba(154, 122, 82, 0.48);
  --rn-field-shadow: rgba(154, 122, 82, 0.12);
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(760px 320px at 0% 0%, rgba(207, 186, 155, 0.26), transparent 56%),
    linear-gradient(180deg, #f7f2eb 0%, #f1ebe2 100%);
}

.rn-main-switcher-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 52px);
  position: relative;
}

.rn-main-switcher-screen::before {
  display: none;
}

.rn-main-switcher-page .rn-switcher--inline {
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.rn-switcher__panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rn-switcher--inline .rn-switcher__panel-header {
  justify-content: center;
}

.rn-switcher__panel-title {
  flex: 1;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #1f2a44;
  text-align: center;
}

.rn-switcher--inline .rn-switcher__panel-title {
  max-width: 14ch;
  margin: 0 auto;
  color: var(--rn-heading);
  font-size: clamp(1.7rem, 4.2vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: none;
  text-wrap: balance;
}

.rn-switcher__close {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.rn-switcher__field {
  position: relative;
  z-index: 1;
}

.rn-switcher__field.is-open {
  z-index: 30;
}

.rn-switcher--inline .rn-switcher__field.is-open {
  z-index: 80;
}

.rn-switcher__field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2c3a56;
  font-size: 16px;
}

.rn-switcher--inline .rn-switcher__field {
  display: grid;
  gap: 10px;
}

.rn-switcher--inline .rn-switcher__field label {
  margin-bottom: 0;
  color: var(--rn-text-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.rn-switcher__label-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #3d4c6e;
  background: rgba(44, 58, 86, 0.09);
}

.rn-switcher__field select {
  width: 100%;
  padding: 14px;
  border: 1px solid #dbe3f1;
  border-radius: 12px;
  background: #fff;
}

.rn-switcher__panel .select2-container {
  width: 100% !important;
}

.rn-switcher__panel .select2-container--default .select2-selection--single,
.rn-switcher__panel .select2-container--default .select2-selection--single .select2-selection__rendered,
.rn-switcher__panel .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 54px;
}

.rn-switcher__panel .select2-container--default .select2-selection--single {
  border: 1px solid #dbe3f1;
  border-radius: 12px;
  background: #fff;
}

.rn-switcher__panel .select2-container--default .select2-selection--single .select2-selection__rendered {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding-left: 14px;
  padding-right: 40px;
  color: #243452;
  line-height: 54px;
}

.rn-switcher__panel .select2-container--default .select2-selection--single .select2-selection__arrow {
  right: 8px;
}

.rn-switcher__panel .select2-container--open,
.rn-switcher__panel .select2-dropdown {
  z-index: 10002;
}

.rn-switcher__panel .select2-dropdown {
  max-width: 100%;
}

.rn-switcher__panel .select2-results > .select2-results__options {
  max-height: min(280px, 42vh);
}

.rn-switcher__panel .select2-results__option {
  white-space: normal;
  word-break: break-word;
}

.rn-switcher--shortcode {
  max-width: 100%;
}

.rn-switcher__currency {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-weight: 700;
  color: #2f3c58;
  padding: 8px 0 2px;
}

.rn-switcher--inline .rn-switcher__currency {
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--rn-field-border);
  border-radius: 16px;
  background: #fcfaf6;
  box-shadow: none;
}

.rn-switcher__currency-label {
  opacity: 0.74;
  font-weight: 700;
}

.rn-switcher--inline .rn-switcher__currency-label {
  opacity: 1;
  color: var(--rn-text-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.rn-switcher__currency-value {
  margin-top: 0;
  font-size: 31px;
  line-height: 1;
  font-weight: 800;
}

.rn-switcher--inline .rn-switcher__currency-value {
  color: var(--rn-heading);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  letter-spacing: -0.02em;
}

.rn-switcher__apply {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2359ff 0%, #3f9eff 100%);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 26px rgba(35, 89, 255, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.rn-switcher--inline .rn-switcher__apply {
  min-height: 52px;
  border-radius: 14px;
  background: #2f2419;
  box-shadow: none;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.rn-switcher__apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(35, 89, 255, 0.32);
  filter: brightness(1.02);
}

.rn-switcher--inline .rn-switcher__apply:hover,
.rn-switcher--inline .rn-switcher__apply:focus-visible {
  box-shadow: 0 10px 24px rgba(47, 36, 25, 0.16);
}

.rn-switcher--inline .select2-container--default .select2-selection--single,
.rn-switcher--inline .select2-container--default .select2-selection--single .select2-selection__rendered,
.rn-switcher--inline .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 56px;
}

.rn-switcher--inline .select2-container {
  position: relative;
  z-index: 1;
}

.rn-switcher--inline .rn-switcher__field.is-open .select2-container {
  z-index: 70;
}

.rn-switcher--inline .select2-container--default .select2-selection--single {
  border: 1px solid var(--rn-field-border);
  border-radius: 14px;
  background: var(--rn-field-bg);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rn-switcher--inline .select2-container--default .select2-selection--single .select2-selection__rendered {
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 44px;
  color: var(--rn-heading);
  font-size: clamp(1rem, 3vw, 1.1rem);
  font-weight: 600;
  line-height: 1.2;
}

.rn-switcher--inline .select2-container--default.select2-container--open .select2-selection--single,
.rn-switcher--inline .select2-container--default .select2-selection--single:focus,
.rn-switcher--inline .select2-container--default .select2-selection--single:focus-visible {
  border-color: var(--rn-field-border-active);
  box-shadow: 0 0 0 4px var(--rn-field-shadow);
}

.rn-switcher--inline .select2-container--default .select2-selection--single .select2-selection__arrow {
  right: 10px;
}

.rn-switcher--inline .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--rn-accent) transparent transparent transparent;
  border-width: 6px 5px 0 5px;
  margin-left: -5px;
  margin-top: -3px;
}

.rn-switcher--inline .rn-select2-option,
.rn-switcher--inline .select2-dropdown .rn-select2-option {
  width: 100%;
  align-items: center;
  gap: 12px;
}

.rn-switcher--inline .rn-select2-text,
.rn-switcher--inline .select2-dropdown .rn-select2-text {
  font-size: 1rem;
  font-weight: 600;
}

.rn-switcher--inline .select2-container--default .select2-results__option,
.rn-switcher--inline .select2-dropdown .select2-results__option {
  margin: 2px 0;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--rn-text);
}

.rn-switcher--inline .select2-container--default .select2-results__option--highlighted[aria-selected],
.rn-switcher--inline .select2-dropdown .select2-results__option--highlighted[aria-selected] {
  background: rgba(154, 122, 82, 0.12);
  color: var(--rn-accent-strong);
}

.rn-switcher--inline .rn-select2-flag,
.rn-switcher--inline .select2-dropdown .rn-select2-flag {
  width: 24px;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
}

.rn-switcher--inline .select2-dropdown {
  margin-top: 6px;
  border: 1px solid var(--rn-field-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(43, 31, 18, 0.12);
  overflow: hidden;
}

.rn-switcher--inline .select2-results > .select2-results__options {
  max-height: min(420px, calc(100dvh - 160px));
  padding: 6px;
}

/* ========================================
   New Header Country Dropdown Switcher
   Legacy drawer styles above remain intact.
======================================== */

.rn-country-header-switcher {
  position: relative;
  display: inline-block;
  max-width: 100%;
  font-family: inherit;
}

.rn-country-header-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 4px 8px;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  list-style: none;
  border-radius: 999px;
  user-select: none;
}

.rn-country-header-switcher__toggle::-webkit-details-marker {
  display: none;
}

.rn-country-header-switcher__toggle:hover,
.rn-country-header-switcher__toggle:focus-visible {
  background: rgba(15, 23, 42, 0.06);
}

.rn-country-header-switcher__flag,
.rn-country-header-switcher__option-flag {
  width: 20px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rn-country-header-switcher__flag svg,
.rn-country-header-switcher__flag img,
.rn-country-header-switcher__option-flag svg,
.rn-country-header-switcher__option-flag img {
  width: 100%;
  height: 100%;
  display: block;
}

.rn-country-header-switcher__label {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rn-country-header-switcher__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.rn-country-header-switcher__chevron .ct-icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.rn-country-header-switcher[open] .rn-country-header-switcher__chevron {
  transform: rotate(180deg);
}

.rn-country-header-switcher__menu {
  position: absolute;
  top: auto;
  right: auto;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 1000;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 24px));
  max-height: min(320px, calc(100dvh - 32px));
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.rn-country-header-switcher__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1f2937;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
}

.rn-country-header-switcher__option:hover,
.rn-country-header-switcher__option:focus-visible {
  background: rgba(15, 23, 42, 0.06);
}

.rn-country-header-switcher__option.is-active {
  background: rgba(35, 89, 255, 0.08);
  color: #1d3d8f;
  font-weight: 700;
}

.rn-country-header-switcher__option-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .rn-country-header-switcher {
    display: inline-block;
    width: auto;
  }

  .rn-country-header-switcher__toggle {
    width: auto;
    justify-content: flex-start;
    padding: 8px 10px;
  }

  .rn-country-header-switcher__menu {
    left: 0;
    min-width: 220px;
    width: auto;
  }
}

.rn-switcher__brand {
  /* width: 66px;
  height: 66px; */
  margin: -8px auto 2px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background: linear-gradient(145deg, #1f5fff 0%, #6a5bff 100%);
  box-shadow: 0 14px 30px rgba(36, 75, 255, 0.32); */
}

.rn-switcher--inline .rn-switcher__brand {
  width: clamp(74px, 18vw, 92px);
  min-height: clamp(74px, 18vw, 92px);
  margin: 0 auto 8px;
  padding: 12px;
  border: 1px solid rgba(111, 93, 71, 0.14);
  border-radius: 20px;
  background: #fcfaf6;
  box-shadow: 0 8px 20px rgba(43, 31, 18, 0.08);
}

.rn-switcher__brand svg {
  width: 38px;
  height: 28px;
  border-radius: 6px;
}

.rn-switcher__brand img {
  width: 85px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.rn-switcher--inline .rn-switcher__brand img {
  width: 100%;
  max-width: 64px;
  height: auto;
}

@media (max-width: 600px) {
  .rn-switcher--shortcode {
    display: block;
    width: 100%;
  }

  .rn-switcher--shortcode .rn-switcher__trigger {
    width: 100%;
    justify-content: space-between;
    padding: 10px 12px;
  }

  .rn-switcher__overlay {
    justify-content: stretch;
  }

  .rn-switcher__panel {
    width: 100%;
    max-width: 100vw;
    padding: 32px 18px 24px;
  }

  .rn-switcher--inline .rn-switcher__panel {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .rn-switcher__panel-title {
    font-size: 24px;
    line-height: 1.12;
  }

  .rn-switcher--inline .rn-switcher__panel-title {
    max-width: 12ch;
  }

  .rn-switcher--inline .rn-switcher__field label,
  .rn-switcher--inline .rn-switcher__currency-label {
    letter-spacing: 0.02em;
  }

  .rn-switcher--inline .rn-select2-text {
    font-size: 16px;
  }

  .rn-switcher--inline .select2-container--default .select2-selection--single,
  .rn-switcher--inline .select2-container--default .select2-selection--single .select2-selection__rendered,
  .rn-switcher--inline .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 52px;
  }

  .rn-switcher--inline .select2-container--default .select2-selection--single {
    border-radius: 12px;
  }

  .rn-switcher--inline .select2-dropdown {
    border-radius: 12px;
  }

  .rn-switcher--inline .rn-switcher__currency {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .rn-switcher--inline .rn-switcher__apply {
    min-height: 48px;
    letter-spacing: 0.01em;
  }

  .rn-switcher__panel .select2-results > .select2-results__options {
    max-height: min(320px, 45vh);
  }
}
