/* Lunisc — shared public-header spacing, particularly RTL guest navigation.
   Loaded after lunisc.css; no changes to forms or navigation logic. */
.header-main > .brand,
.header-main > .header-actions {
  flex-shrink: 0;
}
.header-main .auth-link {
  white-space: nowrap;
  flex: 0 0 auto;
  justify-content: center;
  text-align: center;
}
.header-main .header-actions {
  min-width: 0;
  white-space: nowrap;
}
.header-main .main-nav {
  flex: 0 1 auto;
}
/* Give longer Arabic labels breathing room before the mobile breakpoint. */
@media (min-width:681px) and (max-width:1199px) {
  html[dir="rtl"] .header-main {gap: 8px;}
  html[dir="rtl"] .main-nav {margin-inline-start:0;}
  html[dir="rtl"] .main-nav > a {padding-inline:7px;}
  html[dir="rtl"] .header-actions {gap: 5px;}
  html[dir="rtl"] .auth-link {padding-inline:8px;}
}
/* Small phones cannot fit full wordmark + two Arabic buttons + locale control. */
@media (max-width:680px) {
  .header-main {gap: 8px;}
  .header-main > .brand {gap:0;}
  .header-main > .brand .brand-name {display:none;}
  .header-main > .header-actions {margin-inline-start:auto;gap:5px;}
  .header-main .auth-link {
    height:34px; padding-inline:8px; font-size:11.5px; line-height:1.2;
  }
  .header-main .header-actions .icon-btn.lang {
    min-width:34px; height:34px; padding-inline:6px;
  }
}
@media (max-width:359px) {
  .header-main > .header-actions {gap:3px;}
  .header-main .auth-link {padding-inline:6px;font-size:11px;}
}

/* Accessible native-details account dropdown in the shared header. */
.profile-menu-wrap { position: relative; flex-shrink: 0; }
.profile-menu-trigger { cursor: pointer; list-style: none; user-select: none; }
.profile-menu-trigger::-webkit-details-marker { display: none; }
.profile-menu-trigger::marker { content: ''; }
.profile-menu-wrap[open] .profile-menu-trigger { box-shadow: 0 0 0 3px rgba(45, 96, 161, .13); border-color: #aac5e5; }
.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 100;
  width: min(246px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 13px 35px rgba(17, 24, 39, .14);
  white-space: normal;
  animation: lunisc-profile-dropdown-in .16s ease-out both;
}
.profile-menu a, .profile-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.profile-menu a:hover, .profile-menu button:hover,
.profile-menu a:focus-visible, .profile-menu button:focus-visible {
  background: var(--blue-soft);
  color: var(--blue);
}
.profile-menu svg { width: 18px; height: 18px; flex: 0 0 18px; }
.profile-menu form { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid var(--line); }
.profile-menu .profile-menu-logout { color: #b42318; }
.profile-menu .profile-menu-logout:hover,
.profile-menu .profile-menu-logout:focus-visible { color: #922018; background: #fff1f0; }
@keyframes lunisc-profile-dropdown-in {
  from { opacity: .3; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .profile-menu { animation: none; }
}
