/* deep-i18n.css — قائمة الدولة ومنع الوميض (deep-i18n.js) */

/* أوّل زيارة بلهجة فقط، وبحدّ 300ms يفرضه السكربت */
html.i18n-wait body { visibility: hidden; }

.i18n-pick { position: relative; display: inline-flex; align-items: center; }

.i18n-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font: inherit; font-size: .88rem; line-height: 1.2; white-space: nowrap;
  color: var(--ink-2, var(--ink)); background: transparent;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .32rem .6rem; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.i18n-btn:hover { background: var(--surface-2, var(--surface)); border-color: var(--rule-2, var(--rule)); }
.i18n-chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .6; }
.i18n-btn[aria-expanded="true"] .i18n-chev { transform: rotate(180deg); }

.i18n-flag { display: inline-flex; flex: none; }
.i18n-flag svg {
  width: 21px; height: 14px; display: block; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(16, 22, 28, .14);
}
.i18n-flag-ar {
  width: 21px; height: 14px; border-radius: 2px; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 600; line-height: 1;
  color: var(--brand-2, var(--brand)); background: var(--brand-soft, #EAF0F5);
}

.i18n-list {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 80;
  min-width: 12.5rem; max-height: min(70vh, 26rem); overflow-y: auto;
  margin: 0; padding: .35rem; list-style: none;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(7, 32, 61, .18);
}
.i18n-list[hidden] { display: none; }
.i18n-list li {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .6rem; border-radius: 8px; cursor: pointer; font-size: .92rem;
}
.i18n-list li:hover, .i18n-list li:focus { background: var(--surface-2, var(--brand-soft)); outline: none; }
.i18n-list li:focus-visible { box-shadow: inset 0 0 0 2px var(--sky, #297FF6); }
.i18n-list li[aria-selected="true"] { font-weight: 600; color: var(--brand-2, var(--brand)); }

/* القائمة المطويّة على الجوال: الاختيار سطرٌ في القائمة، والدول تُفتح تحته */
@media (max-width: 62rem) {
  .site-nav .i18n-pick { display: block; padding: .6rem .6rem; border-bottom: 1px solid var(--rule); }
  .site-nav .i18n-btn { width: 100%; justify-content: flex-start; padding: .5rem .7rem; }
  .site-nav .i18n-chev { margin-inline-start: auto; }
  .site-nav .i18n-list { position: static; margin-top: .4rem; box-shadow: none; max-height: 18rem; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) { .i18n-btn, .i18n-chev { transition: none; } }
