/**
 * Apex Voyant code-managed frontend styles.
 *
 * Keep plugin/theme form CSS minimal where possible. This file is the stable
 * place for shared header, language, and site-wide visual refinements.
 */

@media (min-width: 922px) {
  .gt_switcher_wrapper {
    display: none !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate,
  .ast-desktop .main-header-menu .menu-item-gtranslate,
  .ast-builder-menu .menu-item-gtranslate {
    display: flex !important;
    align-items: stretch !important;
    margin-left: 22px !important;
    position: relative !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate a.gt-current-wrapper,
  .ast-desktop .main-header-menu .menu-item-gtranslate a.gt-current-wrapper,
  .ast-builder-menu .menu-item-gtranslate a.gt-current-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: auto !important;
    min-height: 76px !important;
    padding: 0 1em !important;
    color: #07111f !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 1.25px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate a.gt-current-wrapper::before,
  .ast-desktop .main-header-menu .menu-item-gtranslate a.gt-current-wrapper::before,
  .ast-builder-menu .menu-item-gtranslate a.gt-current-wrapper::before {
    content: "LANGUAGE" !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate a.gt-current-wrapper:hover,
  .ast-desktop .main-header-menu .menu-item-gtranslate a.gt-current-wrapper:hover,
  .ast-builder-menu .menu-item-gtranslate a.gt-current-wrapper:hover {
    color: #bc2326 !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate a.gt-current-wrapper img,
  #ast-desktop-header .main-header-menu .menu-item-gtranslate a.gt-current-wrapper span,
  .ast-desktop .main-header-menu .menu-item-gtranslate a.gt-current-wrapper img,
  .ast-desktop .main-header-menu .menu-item-gtranslate a.gt-current-wrapper span,
  .ast-builder-menu .menu-item-gtranslate a.gt-current-wrapper img,
  .ast-builder-menu .menu-item-gtranslate a.gt-current-wrapper span {
    display: none !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate .sub-menu,
  .ast-desktop .main-header-menu .menu-item-gtranslate .sub-menu,
  .ast-builder-menu .menu-item-gtranslate .sub-menu {
    left: auto !important;
    right: 0 !important;
    width: 168px !important;
    min-width: 168px !important;
    padding: 8px !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
    overflow: hidden !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate .sub-menu a,
  .ast-desktop .main-header-menu .menu-item-gtranslate .sub-menu a,
  .ast-builder-menu .menu-item-gtranslate .sub-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 11px 13px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate .sub-menu a:hover,
  .ast-desktop .main-header-menu .menu-item-gtranslate .sub-menu a:hover,
  .ast-builder-menu .menu-item-gtranslate .sub-menu a:hover {
    background: rgba(188, 35, 38, 0.08) !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate .sub-menu img,
  .ast-desktop .main-header-menu .menu-item-gtranslate .sub-menu img,
  .ast-builder-menu .menu-item-gtranslate .sub-menu img {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    flex: 0 0 auto !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate .sub-menu span,
  .ast-desktop .main-header-menu .menu-item-gtranslate .sub-menu span,
  .ast-builder-menu .menu-item-gtranslate .sub-menu span {
    font-size: 13px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  #ast-desktop-header .main-header-menu .menu-item-gtranslate a[data-gt-lang=ar] span,
  .ast-desktop .main-header-menu .menu-item-gtranslate a[data-gt-lang=ar] span,
  .ast-builder-menu .menu-item-gtranslate a[data-gt-lang=ar] span {
    direction: rtl !important;
    unicode-bidi: plaintext !important;
  }
}

@media (max-width: 921px) {
  .gt_switcher_wrapper,
  .gt_switcher_wrapper * {
    box-sizing: border-box !important;
  }

  .gt_switcher_wrapper {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper {
    position: fixed !important;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 207px) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 999999 !important;
    display: grid !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 9px !important;
    width: calc(100% - 48px) !important;
    max-width: 720px !important;
    margin: 0 !important;
    padding: 15px 16px 14px !important;
    transform: translateX(-50%) !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.05) !important;
    border-radius: 0 0 18px 18px !important;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10) !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper::before {
    content: "LANGUAGE" !important;
    grid-column: 1 / -1 !important;
    order: -1 !important;
    display: block !important;
    margin: 0 2px 1px !important;
    color: #07111f !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 1.25px !important;
    line-height: 1 !important;
    text-align: left !important;
    text-transform: uppercase !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper a {
    order: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 7px 9px !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.04) !important;
    white-space: nowrap !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper a:hover,
  body.ast-main-header-nav-open .gt_switcher_wrapper a.gt-current-lang {
    color: #bc2326 !important;
    background: rgba(188, 35, 38, 0.09) !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper img {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    flex: 0 0 auto !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper span {
    display: inline-block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper a[data-gt-lang=ar] span {
    direction: rtl !important;
    unicode-bidi: plaintext !important;
  }
}

@media (max-width: 544px) {
  body.ast-main-header-nav-open .gt_switcher_wrapper {
    width: calc(100% - 30px) !important;
    gap: 8px 7px !important;
    padding: 13px 12px 12px !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper a {
    gap: 3px !important;
    min-height: 32px !important;
    padding: 7px 7px !important;
    font-size: 11px !important;
  }

  body.ast-main-header-nav-open .gt_switcher_wrapper img {
    width: 16px !important;
    height: 16px !important;
  }
}

@media (min-width: 545px) and (max-width: 921px) {
  body.ast-main-header-nav-open .gt_switcher_wrapper {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    transform: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
  }
}
