/* ============================================
   DigitalCraft — i18n & Language Switcher Styles
   ============================================ */

/* Language Switcher Base */
.lang-switch {
  display: inline-flex;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.lang-switch__list {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-switch__item {
  display: inline-flex;
  align-items: center;
}

.lang-switch__divider {
  color: var(--rule, #cbc9bf);
  user-select: none;
  font-size: 11px;
  padding-inline: 2px;
  opacity: 0.6;
}

.lang-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  color: var(--color-muted, #686a62);
  text-decoration: none;
  border-radius: 3px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-switch__link:hover {
  color: var(--ink, #20211e);
  background-color: rgba(32, 33, 30, 0.05);
}

.lang-switch__link.is-active,
.lang-switch__link[aria-current="page"] {
  color: var(--rust, #b5472b);
  font-weight: 600;
  pointer-events: default;
}

.lang-switch__link:focus-visible {
  outline: 2px solid var(--brand-blue, #3498db);
  outline-offset: 2px;
}

/* Header Context: Desktop vs Mobile */
.site-nav .lang-switch--desktop {
  margin-left: 20px;
}

.site-header__mobile-actions {
  display: none;
  align-items: center;
  gap: 10px;
}

@media (max-width: 1023px) {
  .site-nav .lang-switch--desktop {
    display: none;
  }

  .site-header__mobile-actions {
    display: flex;
    align-items: center;
  }

  .lang-switch--mobile {
    font-size: 12px;
    background: rgba(32, 33, 30, 0.04);
    border: 1px solid rgba(32, 33, 30, 0.08);
    border-radius: 4px;
    padding: 3px 5px;
  }

  .lang-switch--mobile .lang-switch__link {
    padding: 3px 5px;
  }
}

@media (max-width: 400px) {
  .site-header__mobile-actions {
    gap: 6px;
  }

  .lang-switch--mobile {
    font-size: 11px;
    padding: 2px 4px;
  }

  .lang-switch--mobile .lang-switch__link {
    padding: 2px 4px;
  }
}

/* Mobile Drawer Context */
.mobile-nav__lang {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.mobile-nav__lang .lang-switch {
  font-size: 16px;
  background: rgba(32, 33, 30, 0.04);
  border: 1px solid rgba(32, 33, 30, 0.1);
  border-radius: 6px;
  padding: 6px 14px;
}

.mobile-nav__lang .lang-switch__link {
  padding: 6px 12px;
}

/* Dismissible Recommendation Banner (Initial Root Visit) */
.lang-recommend-banner {
  position: fixed;
  bottom: 24px;
  left: 5vw;
  z-index: 10005;
  max-width: 440px;
  background: rgba(24, 25, 22, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f2f0e9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
  padding: 16px 20px;
  animation: langBannerFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes langBannerFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-recommend-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lang-recommend-banner__text {
  font-size: 13px;
  line-height: 1.5;
  color: #d3d3c9;
}

.lang-recommend-banner__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lang-recommend-banner__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rust, #b5472b);
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.lang-recommend-banner__link:hover {
  background: #cf4f2f;
}

.lang-recommend-banner__link:focus-visible {
  outline: 2px solid var(--brand-blue, #3498db);
  outline-offset: 2px;
}

.lang-recommend-banner__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #aaa99f;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 3px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-recommend-banner__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
  .lang-recommend-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
    padding: 14px 16px;
  }
}

.lang-recommend-banner__attribution { color: #d3d3c9; font-size: 10px; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .lang-recommend-banner { animation: none; } }
