/* Стили для компонента LanguageSwitcher с RTL поддержкой */
/* ВАЖНО: Все стили имеют максимальный приоритет для преодоления глобальных правил */

/* Базовые стили для контейнера выпадающего меню */
.language-switcher-dropdown {
  min-width: 9rem !important;
}

/* RTL стили для выпадающего контента */
html[dir="rtl"] .language-switcher-dropdown {
  text-align: right !important;
  direction: rtl !important;
}

/* ПРИНУДИТЕЛЬНЫЕ СТИЛИ ДЛЯ ПРЕОДОЛЕНИЯ ГЛОБАЛЬНЫХ ПРАВИЛ */

/* Переопределяем глобальные flex правила для наших элементов */
html[dir="rtl"] .language-switcher-dropdown .language-switcher-item {
  flex-direction: row-reverse !important;
  justify-content: space-between !important;
  text-align: right !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

html[dir="ltr"] .language-switcher-dropdown .language-switcher-item {
  flex-direction: row !important;
  justify-content: space-between !important;
  text-align: left !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

/* Контейнер для текста */
html[dir="rtl"] .language-switcher-dropdown .language-switcher-content {
  flex-direction: column !important;
  align-items: flex-end !important;
  display: flex !important;
  text-align: right !important;
  width: 100% !important;
}

html[dir="ltr"] .language-switcher-dropdown .language-switcher-content {
  flex-direction: column !important;
  align-items: flex-start !important;
  display: flex !important;
  text-align: left !important;
  width: 100% !important;
}

/* Галочка */
.language-switcher-check {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* СПЕЦИФИЧНЫЕ ПРАВИЛА ДЛЯ RADIX КОМПОНЕНТОВ */

/* Переопределяем все dropdown menu элементы */
html[dir="rtl"] [data-radix-dropdown-menu-content] .language-switcher-item {
  flex-direction: row-reverse !important;
  justify-content: space-between !important;
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] [data-radix-dropdown-menu-content] .language-switcher-content {
  text-align: right !important;
  direction: rtl !important;
}

/* Элементы меню */
html[dir="rtl"] [role="menuitem"] .language-switcher-item {
  flex-direction: row-reverse !important;
  justify-content: space-between !important;
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
}

html[dir="rtl"] [role="menuitem"] .language-switcher-content {
  text-align: right !important;
  direction: rtl !important;
  align-items: flex-end !important;
}

/* Специальные правила для всех span элементов внутри dropdown */
html[dir="rtl"] .language-switcher-dropdown span {
  text-align: right !important;
  direction: rtl !important;
}

/* Принудительно переопределяем глобальные flex правила */
html[dir="rtl"] .language-switcher-dropdown * {
  direction: rtl !important;
}

html[dir="rtl"] .language-switcher-dropdown [class*="flex"] {
  flex-direction: row-reverse !important;
}

/* Обеспечиваем правильное направление для всего выпадающего меню */
html[dir="rtl"] [data-radix-popper-content-wrapper] .language-switcher-dropdown {
  direction: rtl !important;
  text-align: right !important;
}

html[dir="rtl"] [data-radix-dropdown-menu-content] {
  direction: rtl !important;
  text-align: right !important;
}

/* ПРИНУДИТЕЛЬНОЕ УПРАВЛЕНИЕ ПОРЯДКОМ ЭЛЕМЕНТОВ */

/* RTL: Галочка (слева), Текст (справа) */
html[dir="rtl"] .language-switcher-dropdown .language-switcher-check {
  order: 0 !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

html[dir="rtl"] .language-switcher-dropdown .language-switcher-content {
  order: 1 !important;
}

/* LTR: Текст (слева), Галочка (справа) */
html[dir="ltr"] .language-switcher-dropdown .language-switcher-content {
  order: 0 !important;
}

html[dir="ltr"] .language-switcher-dropdown .language-switcher-check {
  order: 1 !important;
  margin-right: 0 !important;
  margin-left: auto !important;
}

/* ПРИНУДИТЕЛЬНОЕ ВЫРАВНИВАНИЕ ПО ПРАВОЙ СТОРОНЕ ДЛЯ RTL */

/* Переопределяем базовые стили Radix UI компонента */
html[dir="rtl"] [data-radix-dropdown-menu-content] {
  direction: rtl !important;
  text-align: right !important;
}

html[dir="rtl"] [data-radix-dropdown-menu-content] * {
  direction: rtl !important;
  text-align: right !important;
}

/* Принудительное выравнивание всего контейнера dropdown */
html[dir="rtl"] .language-switcher-dropdown {
  direction: rtl !important;
  text-align: right !important;
}

/* Специфичные правила для DropdownMenuItem */
html[dir="rtl"] .language-switcher-dropdown [data-radix-dropdown-menu-item] {
  justify-content: flex-end !important;
  text-align: right !important;
  direction: rtl !important;
  flex-direction: row-reverse !important;
}

/* Переопределяем базовые стили элементов меню */
html[dir="rtl"] .language-switcher-dropdown [role="menuitem"] {
  justify-content: flex-end !important;
  text-align: right !important;
  direction: rtl !important;
  flex-direction: row-reverse !important;
}

/* Принудительное выравнивание для всех flex элементов внутри */
html[dir="rtl"] .language-switcher-dropdown .relative.flex {
  justify-content: flex-end !important;
  text-align: right !important;
  direction: rtl !important;
  flex-direction: row-reverse !important;
}

/* Принудительное выравнивание motion.div */
html[dir="rtl"] .language-switcher-dropdown div[style*="flex-direction"] {
  justify-content: flex-end !important;
  text-align: right !important;
  direction: rtl !important;
}

/* Максимально специфичные правила для элементов меню */
html[dir="rtl"] [data-radix-dropdown-menu-content] [role="menuitem"].cursor-pointer {
  justify-content: flex-end !important;
  text-align: right !important;
  direction: rtl !important;
}

html[dir="rtl"] [data-radix-dropdown-menu-content] [role="menuitem"].cursor-pointer > div {
  justify-content: flex-end !important;
  text-align: right !important;
  direction: rtl !important;
}

/* Выравнивание самого выпадающего контента */
html[dir="rtl"] [data-radix-dropdown-menu-content].language-switcher-dropdown {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  text-align: right !important;
}

html[dir="rtl"] [data-radix-dropdown-menu-content].language-switcher-dropdown > * {
  width: 100% !important;
  text-align: right !important;
  justify-content: flex-end !important;
}

/* ПРИНУДИТЕЛЬНОЕ ВЫРАВНИВАНИЕ SPAN ЭЛЕМЕНТОВ ПО ПРАВОЙ СТОРОНЕ */

/* Специфичные правила для span элементов с текстом */
html[dir="rtl"] .language-switcher-dropdown span.text-sm {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
}

html[dir="rtl"] .language-switcher-dropdown span.font-medium {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
}

html[dir="rtl"] .language-switcher-dropdown .language-switcher-content span {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
}

/* Принудительное выравнивание описания */
html[dir="rtl"] .language-switcher-dropdown span.text-xs {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
}

/* Очень специфичные правила для всех span внутри dropdown */
html[dir="rtl"] [data-radix-dropdown-menu-content] .language-switcher-dropdown span {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
}

html[dir="rtl"] [role="menuitem"] .language-switcher-dropdown span {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
}

/* Максимально специфичные правила для класса text-sm font-medium */
html[dir="rtl"] .language-switcher-dropdown [role="menuitem"] span.text-sm.font-medium {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Принудительное выравнивание текстового контейнера */
html[dir="rtl"] .language-switcher-dropdown .language-switcher-content {
  width: 100% !important;
  text-align: right !important;
  direction: rtl !important;
  align-items: flex-end !important;
  justify-content: flex-end !important;
} /* Стили для компонента AutoTranslationToggle с оптимизацией для мобильных устройств */

/* Базовые стили для индикатора активности */
.auto-translation-indicator {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: hsl(var(--primary));
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
  .auto-translation-indicator {
    /* Принудительно устанавливаем фиксированные размеры */
    width: 0.5rem !important;
    height: 0.5rem !important;
    min-width: 0.5rem;
    min-height: 0.5rem;
    max-width: 0.5rem;
    max-height: 0.5rem;
    
    /* Оптимизация рендеринга для мобильных */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    
    /* Предотвращаем размытие на мобильных */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Ограничиваем область перерисовки */
    contain: layout style paint;
  }
  
  /* Убираем двойную анимацию на мобильных */
  .auto-translation-indicator * {
    animation: none !important;
    transform: none !important;
  }
}

/* Дополнительная оптимизация для очень маленьких экранов */
@media (max-width: 480px) {
  .auto-translation-indicator {
    width: 0.4rem !important;
    height: 0.4rem !important;
    min-width: 0.4rem;
    min-height: 0.4rem;
    max-width: 0.4rem;
    max-height: 0.4rem;
    top: -0.2rem;
    right: -0.2rem;
  }
}

/* Стили для RTL поддержки */
html[dir="rtl"] .auto-translation-indicator {
  right: auto;
  left: -0.25rem;
}

@media (max-width: 480px) {
  html[dir="rtl"] .auto-translation-indicator {
    left: -0.2rem;
  }
} /* MobileTopNavbar RTL Support */

/* Иконка Briefcase в логотипе */
html[dir="rtl"] .mobileTopNavbar-logo-icon {
  margin-left: 0.375rem !important; /* ml-1.5 */
  margin-right: 0 !important;
}

html[dir="ltr"] .mobileTopNavbar-logo-icon {
  margin-right: 0.375rem !important; /* mr-1.5 */
  margin-left: 0 !important;
} /* MobileHero RTL Support */

/* Тег с отступом от навбара */
.mobileHero-tagline {
  margin-top: 1rem !important;
}

/* Поле поиска */
html[dir="rtl"] .mobileHero-search-input {
  text-align: right !important;
  direction: rtl !important;
  padding-right: 3rem !important;
  padding-left: 1rem !important;
}

html[dir="ltr"] .mobileHero-search-input {
  text-align: left !important;
  direction: ltr !important;
  padding-left: 3rem !important;
  padding-right: 1rem !important;
}

/* Иконка поиска */
html[dir="rtl"] .mobileHero-search-icon {
  right: 1rem !important;
  left: auto !important;
}

html[dir="ltr"] .mobileHero-search-icon {
  left: 1rem !important;
  right: auto !important;
}

/* Placeholder для иврита */
html[dir="rtl"] .mobileHero-search-input::-moz-placeholder {
  text-align: right !important;
  direction: rtl !important;
}
html[dir="rtl"] .mobileHero-search-input::placeholder {
  text-align: right !important;
  direction: rtl !important;
} /* MobileFeaturedJobs RTL Support */

/* Контейнер карточки */
.mobileFeaturedJobs-card {
  direction: inherit !important;
}

/* Заголовок вакансии */
html[dir="rtl"] .mobileFeaturedJobs-title {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="ltr"] .mobileFeaturedJobs-title {
  text-align: left !important;
  direction: ltr !important;
}

/* Название компании */
html[dir="rtl"] .mobileFeaturedJobs-company {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="ltr"] .mobileFeaturedJobs-company {
  text-align: left !important;
  direction: ltr !important;
}

/* Детали с иконками (локация, тип работы) - Повышенная специфичность */
html[dir="rtl"] div.mobileFeaturedJobs-detail.flex.items-center {
  flex-direction: row-reverse !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  display: flex !important;
  align-items: center !important;
}

html[dir="ltr"] div.mobileFeaturedJobs-detail.flex.items-center {
  flex-direction: row !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Текст в деталях - Повышенная специфичность */
html[dir="rtl"] .mobileFeaturedJobs-detail .mobileFeaturedJobs-detail-text {
  text-align: right !important;
  direction: rtl !important;
  flex: 1 !important;
  order: 1 !important;
}

html[dir="ltr"] .mobileFeaturedJobs-detail .mobileFeaturedJobs-detail-text {
  text-align: left !important;
  direction: ltr !important;
  flex: 1 !important;
  order: 2 !important;
}

/* Иконки в деталях - Повышенная специфичность */
html[dir="rtl"] .mobileFeaturedJobs-detail .mobileFeaturedJobs-icon {
  order: 2 !important;
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
  flex-shrink: 0 !important;
}

html[dir="ltr"] .mobileFeaturedJobs-detail .mobileFeaturedJobs-icon {
  order: 1 !important;
  margin-right: 0.5rem !important;
  margin-left: 0 !important;
  flex-shrink: 0 !important;
}

/* Нижняя секция с зарплатой */
html[dir="rtl"] .mobileFeaturedJobs-footer {
  flex-direction: row-reverse !important;
}

html[dir="ltr"] .mobileFeaturedJobs-footer {
  flex-direction: row !important;
}

/* Зарплата */
html[dir="rtl"] .mobileFeaturedJobs-salary {
  order: 2 !important;
  text-align: right !important;
}

html[dir="ltr"] .mobileFeaturedJobs-salary {
  order: 1 !important;
  text-align: left !important;
}

/* Кнопка детали */
html[dir="rtl"] .mobileFeaturedJobs-details-btn {
  order: 1 !important;
  flex-direction: row-reverse !important;
  gap: 0.5rem !important;
}

html[dir="ltr"] .mobileFeaturedJobs-details-btn {
  order: 2 !important;
  flex-direction: row !important;
  gap: 0.5rem !important;
}

/* Дополнительные правила с максимальной специфичностью для переопределения Tailwind */
body html[dir="rtl"] .mobileFeaturedJobs-card .mobileFeaturedJobs-detail {
  flex-direction: row-reverse !important;
}

body html[dir="ltr"] .mobileFeaturedJobs-card .mobileFeaturedJobs-detail {
  flex-direction: row !important;
}

body html[dir="rtl"] .mobileFeaturedJobs-card .mobileFeaturedJobs-detail .mobileFeaturedJobs-icon {
  order: 2 !important;
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}

body html[dir="ltr"] .mobileFeaturedJobs-card .mobileFeaturedJobs-detail .mobileFeaturedJobs-icon {
  order: 1 !important;
  margin-right: 0.5rem !important;
  margin-left: 0 !important;
}

body html[dir="rtl"] .mobileFeaturedJobs-card .mobileFeaturedJobs-detail .mobileFeaturedJobs-detail-text {
  order: 1 !important;
}

body html[dir="ltr"] .mobileFeaturedJobs-card .mobileFeaturedJobs-detail .mobileFeaturedJobs-detail-text {
  order: 2 !important;
}

/* Принудительное сохранение квадратной формы для иконок компаний */
.mobileFeaturedJobs-card .mobileFeaturedJobs-icon-container {
  width: 3.5rem !important; /* 56px */
  height: 3.5rem !important; /* 56px */
  min-width: 3.5rem !important;
  min-height: 3.5rem !important;
  max-width: 3.5rem !important;
  max-height: 3.5rem !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  aspect-ratio: 1 / 1 !important;
  box-sizing: border-box !important;
}

/* Дополнительная фиксация для логотипов компании */
.mobileFeaturedJobs-card .mobileFeaturedJobs-icon-container img {
  width: 100% !important;
  height: 100% !important;
  -o-object-fit: contain !important;
     object-fit: contain !important;
  padding: 0.5rem !important;
}

/* Фиксация для иконок по умолчанию (Briefcase) */
.mobileFeaturedJobs-card .mobileFeaturedJobs-icon-container svg {
  width: 1.75rem !important; /* 28px */
  height: 1.75rem !important; /* 28px */
  flex-shrink: 0 !important;
}

/* Фиксация маленьких иконок в деталях (локация, тип работы) */
.mobileFeaturedJobs-card .interactive-surface .flex-shrink-0 {
  width: 1.5rem !important; /* 24px */
  height: 1.5rem !important; /* 24px */
  min-width: 1.5rem !important;
  min-height: 1.5rem !important;
  max-width: 1.5rem !important;
  max-height: 1.5rem !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  aspect-ratio: 1 / 1 !important;
}

.mobileFeaturedJobs-card .interactive-surface .flex-shrink-0 svg {
  width: 0.75rem !important; /* 12px */
  height: 0.75rem !important; /* 12px */
  flex-shrink: 0 !important;
}/* How It Works Section RTL Support */

/* Контейнер шага */
.howItWorks-step-card {
  direction: inherit !important;
}

/* Контейнер содержимого шага */
html[dir="rtl"] .howItWorks-step-content {
  flex-direction: row-reverse !important;
}

html[dir="ltr"] .howItWorks-step-content {
  flex-direction: row !important;
}

/* Иконка шага */
html[dir="rtl"] .howItWorks-step-icon {
  order: 2 !important;
}

html[dir="ltr"] .howItWorks-step-icon {
  order: 1 !important;
}

/* Текстовый контент */
html[dir="rtl"] .howItWorks-step-text {
  order: 1 !important;
  text-align: right !important;
  direction: rtl !important;
}

html[dir="ltr"] .howItWorks-step-text {
  order: 2 !important;
  text-align: left !important;
  direction: ltr !important;
}

/* Заголовок шага */
html[dir="rtl"] .howItWorks-step-title {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="ltr"] .howItWorks-step-title {
  text-align: left !important;
  direction: ltr !important;
}

/* Описание шага */
html[dir="rtl"] .howItWorks-step-description {
  text-align: right !important;
  direction: rtl !important;
}

html[dir="ltr"] .howItWorks-step-description {
  text-align: left !important;
  direction: ltr !important;
} /* Исправление отображения иконок в JobCard */
.lucide {
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* Специфичные исправления для иконок в JobCard */
.job-card-icon {
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Исправление для контейнеров иконок */
.job-card-icon-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* RTL поддержка для иконок */
html[dir="rtl"] .job-card-icon-spacing {
  margin-right: 0 !important;
  margin-left: 0.375rem !important;
}

html[dir="ltr"] .job-card-icon-spacing {
  margin-left: 0 !important;
  margin-right: 0.375rem !important;
}

/* Исправление для мобильных иконок */
@media (max-width: 640px) {
  .job-card-icon {
    width: 0.75rem !important;
    height: 0.75rem !important;
  }
}

/* Исправление для бейджа автоперевода */
.auto-translate-badge {
  min-width: -moz-max-content !important;
  min-width: max-content !important;
  white-space: nowrap !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
  padding: 0.25rem 0.5rem !important;
  height: auto !important;
  min-height: 1.5rem !important;
}

.auto-translate-badge .lucide {
  flex-shrink: 0 !important;
  width: 0.75rem !important;
  height: 0.75rem !important;
}

/* Убираем скрытие текста на мобильных устройствах */
@media (max-width: 768px) {
  .auto-translate-badge span {
    display: inline !important;
  }
} /* Companies RTL Support */

/* Счетчик компаний */
html[dir="rtl"] .companies-counter {
  text-align: center !important;
}

html[dir="ltr"] .companies-counter {
  text-align: center !important;
}

/* Текст счетчика */
html[dir="rtl"] .companies-counter-text {
  text-align: center !important;
  direction: rtl !important;
} 