/**
 * PsicoForge i18n Language Switcher Styles
 * Drop-in styles for the language switcher component
 */

/* ===== Language Switcher ===== */
.i18n-switcher {
  position: relative;
  display: inline-block;
  font-family: inherit;
}

.i18n-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.i18n-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
}

.i18n-trigger:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.3);
}

.i18n-trigger[aria-expanded="true"] {
  border-color: rgba(0, 255, 136, 0.4);
  background: rgba(0, 255, 136, 0.05);
}

.i18n-flag {
  font-size: 1rem;
  line-height: 1;
}

.i18n-name {
  font-weight: 500;
}

.i18n-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  color: rgba(255, 255, 255, 0.6);
}

.i18n-trigger[aria-expanded="true"] .i18n-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.i18n-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.i18n-dropdown:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Language Options */
.i18n-lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: #a0a0a0;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.i18n-lang-option:hover,
.i18n-lang-option:focus {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  outline: none;
}

.i18n-lang-option.active {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
}

.i18n-lang-option.active::before {
  content: '✓';
  margin-right: 0.25rem;
  color: #00ff88;
  font-weight: 700;
}

.i18n-lang-option .i18n-flag {
  font-size: 1.1rem;
}

/* Light theme variant (for store page) */
.i18n-switcher--light .i18n-trigger {
  background: #f8f8f8;
  border-color: #eee;
  color: #222;
}

.i18n-switcher--light .i18n-trigger:hover {
  background: #f0f0f0;
  border-color: #c83232;
}

.i18n-switcher--light .i18n-trigger:focus {
  box-shadow: 0 0 0 2px rgba(200, 50, 50, 0.3);
}

.i18n-switcher--light .i18n-trigger[aria-expanded="true"] {
  border-color: #c83232;
  background: #fff;
}

.i18n-switcher--light .i18n-chevron {
  color: #777;
}

.i18n-switcher--light .i18n-dropdown {
  background: #fff;
  border-color: #eee;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.i18n-switcher--light .i18n-lang-option {
  color: #777;
}

.i18n-switcher--light .i18n-lang-option:hover,
.i18n-switcher--light .i18n-lang-option:focus {
  background: #fff5f5;
  color: #c83232;
}

.i18n-switcher--light .i18n-lang-option.active {
  background: #fff5f5;
  color: #c83232;
}

.i18n-switcher--light .i18n-lang-option.active::before {
  color: #c83232;
}

/* Responsive */
@media (max-width: 480px) {
  .i18n-trigger .i18n-name {
    display: none;
  }

  .i18n-trigger {
    padding: 0.5rem;
  }
}