/* Standalone, production CSS using the switcher-lang namespace.
   The Tailwind v3 source/config is also included for projects with a build pipeline. */
.switcher-lang-root{position:relative;display:inline-flex;isolation:isolate;font-family:inherit;font-size:14px;color:#172233;z-index: 100 ;}
.switcher-lang-root[hidden]{display:none!important}
.switcher-lang-trigger{min-width:112px;min-height:44px;display:flex;align-items:center;gap:9px;padding:8px 11px;border:1px solid #e5eaf0;border-radius:14px;background:#fff;color:inherit;box-shadow:0 4px 14px rgba(15,23,42,.055),0 1px 2px rgba(15,23,42,.025);cursor:pointer;transition:background .18s,border-color .18s,box-shadow .18s}
.switcher-lang-trigger:hover{background:#f8fafc;border-color:#cbd5e1;box-shadow:0 7px 20px rgba(15,23,42,.09)}
.switcher-lang-trigger:focus-visible,.switcher-lang-option:focus-visible{outline:3px solid #85b7ff;outline-offset:2px}
.switcher-lang-trigger:disabled{cursor:default;opacity:.95}
.switcher-lang-display{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
/* Circular flag holder: fixed size/background belongs to the outer DIV. */
.switcher-lang-flag-wrap {
  --switcher-lang-flag-offset-y: -2px;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f5f9;
  line-height: 0;
}

.switcher-lang-flag {
display: block;
  width: max-content;
  height: auto;
  font-size: 16px;
  line-height: 35px;
  white-space: nowrap;
  transform: translateY( var(--switcher-lang-flag-offset-y) );
  margin: auto;
}

.switcher-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switcher-lang-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.switcher-lang-labels{min-width:0;display:flex;flex-direction:column;gap:2px;text-align:start}
.switcher-lang-labels>span{font-size:13px;font-weight:600;line-height:1.2;white-space:nowrap}
.switcher-lang-label-fa,.switcher-lang-label-en,.switcher-lang-label-native{display:none}
.switcher-lang-root[data-switcher-lang-labels="fa"] .switcher-lang-label-fa{display:inline}
.switcher-lang-root[data-switcher-lang-labels="en"] .switcher-lang-label-en{display:inline}
.switcher-lang-root[data-switcher-lang-labels="native"] .switcher-lang-label-native{display:inline}
.switcher-lang-root[data-switcher-lang-labels="all"] .switcher-lang-labels>span{display:inline}
.switcher-lang-root[data-switcher-lang-labels="all"] .switcher-lang-labels>span{font-size:11px}
.switcher-lang-root[data-switcher-lang-labels="all"] .switcher-lang-label-en{color:#718096;font-weight:400}
.switcher-lang-code{font-size:10px;font-weight:700;letter-spacing:.035em;color:#64748b;background:#f1f5f9;border-radius:7px;padding:3px 5px}
.switcher-lang-chevron{width:15px;height:15px;flex:0 0 auto;color:#64748b;transition:transform .2s}
.switcher-lang-open .switcher-lang-chevron{transform:rotate(180deg)}
.switcher-lang-popover{position:absolute;top:calc(100% + 9px);inset-inline-start:0;z-index:9999;min-width:230px;max-width:min(330px,calc(100vw - 24px));padding:6px;background:#fff;border:1px solid #e6ebf1;border-radius:17px;box-shadow:0 20px 55px rgba(15,23,42,.15),0 5px 12px rgba(15,23,42,.05);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-5px);transition:opacity .15s,transform .15s,visibility .15s}
.switcher-lang-open .switcher-lang-popover{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
.switcher-lang-list{padding:3px 0;margin:0;list-style:none;max-height:min(430px,60vh);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.switcher-lang-item{margin:0;padding:0;list-style:none}
.switcher-lang-option{display:flex;align-items:center;gap:10px;min-height:46px;padding:8px 10px;margin:2px 0;border-radius:11px;color:#263449;text-decoration:none!important;transition:background .15s,color .15s}
.switcher-lang-option:hover,.switcher-lang-option:focus-visible{background:#f0f6ff;color:#1553a3}
.switcher-lang-option-current{background:#eff6ff;color:#1d4ed8}
.switcher-lang-option .switcher-lang-labels{flex:1}
.switcher-lang-check{color:#2563eb;font-size:16px;font-weight:700}
@media(prefers-reduced-motion:reduce){.switcher-lang-root *{transition:none!important}}


/* Responsive presentation modes.
   Set data-switcher-lang-mobile-mode on .switcher-lang-root:
   dropdown (default) | floating | bottom-sheet | chips
   Desktop presentation remains unchanged. */
@media (max-width: 767px) {
  /* Mobile dropdown: compact trigger with the same language data/list. */
  .switcher-lang-root[data-switcher-lang-mobile-mode="dropdown"] .switcher-lang-trigger {
    min-width: 0;
    min-height: 40px;
    padding: 7px 9px;
    gap: 7px;
    border-radius: 12px;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="dropdown"] .switcher-lang-popover {
    min-width: min(260px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }

  /* Floating: fixed round language button; popover opens just above it. */
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] {
    position: fixed;
    inset-inline-end: max(16px, env(safe-area-inset-right));
    inset-block-end: max(18px, env(safe-area-inset-bottom));
    z-index: 10050;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] .switcher-lang-trigger {
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #dce5ef;
    box-shadow: 0 8px 26px rgba(15,23,42,.2);
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] .switcher-lang-display {
    flex: 0 0 auto;
    justify-content: center;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] .switcher-lang-labels,
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] .switcher-lang-code,
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] .switcher-lang-chevron {
    display: none !important;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] .switcher-lang-flag-wrap {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] .switcher-lang-popover {
    position: absolute;
    inset-inline-start: auto;
    inset-inline-end: 0;
    top: auto;
    bottom: calc(100% + 10px);
    min-width: min(270px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  /* Bottom sheet: the same options are rendered in a touch-friendly panel. */
  .switcher-lang-root[data-switcher-lang-mobile-mode="bottom-sheet"] {
    position: fixed;
    inset-inline-end: 16px;
    inset-block-end: max(16px, env(safe-area-inset-bottom));
    z-index: 10050;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="bottom-sheet"] .switcher-lang-trigger {
    min-height: 44px;
    border-radius: 999px;
    box-shadow: 0 8px 26px rgba(15,23,42,.18);
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="bottom-sheet"] .switcher-lang-popover {
    position: fixed;
    inset-inline: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: min(72vh, 620px);
    overflow: auto;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 45px rgba(15,23,42,.2);
    transform: translateY(14px);
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="bottom-sheet"].switcher-lang-open .switcher-lang-popover {
    transform: translateY(0);
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="bottom-sheet"] .switcher-lang-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
    max-height: min(58vh, 480px);
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="bottom-sheet"] .switcher-lang-option {
    min-height: 54px;
    padding: 10px;
    border: 1px solid #edf1f5;
  }

  /* Chips: compact horizontal language pills, always visible on mobile. */
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] {
    display: block;
    width: 100%;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-trigger {
    display: none;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-popover {
    position: static;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    background: transparent;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px 1px 8px;
    -webkit-overflow-scrolling: touch;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-item {
    flex: 0 0 auto;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-option {
    min-height: 38px;
    gap: 6px;
    padding: 6px 10px;
    margin: 0;
    border: 1px solid #e5eaf0;
    border-radius: 999px;
    background: #fff;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-option .switcher-lang-labels {
    flex: 0 0 auto;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-labels>span {
    font-size: 11px;
  }
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-code,
  .switcher-lang-root[data-switcher-lang-mobile-mode="chips"] .switcher-lang-check {
    display: none;
  }
}

/* Optional RTL-safe floating position overrides for devices with safe areas. */
@supports (inset-inline-end: env(safe-area-inset-right)) {
  @media (max-width: 767px) {
    .switcher-lang-root[data-switcher-lang-mobile-mode="floating"] {
      inset-inline-end: max(16px, env(safe-area-inset-right));
    }
  }
}




.switcher-lang-flag-wrap {
    width: 25px;
    height: 25px;
    min-width: 25px;
    flex: 0 0 25px;
    border-radius: 50%;
    overflow: hidden;
}

.switcher-lang-flag {
    width: 100%;
    height: 100%;
}

.switcher-lang-flag img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

