/**
 * Language Switcher Styles
 * 語言切換器樣式
 */

/* Footer Language Switcher - Capsule Style */
.footer-lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 4px;
  margin-top: 8px;
}

.footer-lang-switcher .lang-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.footer-lang-switcher .lang-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px 20px;
  font-size: 14px;
  border-radius: 50px;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
}

.footer-lang-switcher .lang-btn:hover {
  color: #fff;
}

.footer-lang-switcher .lang-btn.active {
  color: #333;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.footer-lang-switcher .lang-divider {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 4px;
}

/* Navbar Language Switcher */
.nav-lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}

.nav-lang-switcher .lang-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary, #666);
  cursor: pointer;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-lang-switcher .lang-btn:hover {
  color: var(--primary-color, #FC3130);
  border-color: var(--primary-color, #FC3130);
}

.nav-lang-switcher .lang-btn.active {
  color: var(--primary-color, #FC3130);
  border-color: var(--primary-color, #FC3130);
  font-weight: 600;
}

/* Mobile Language Switcher */
@media (max-width: 768px) {
  .nav-lang-switcher {
    margin-left: 0;
    margin-top: 16px;
    justify-content: center;
    padding: 12px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .nav-lang-switcher .lang-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Dropdown Language Switcher */
.lang-dropdown {
  position: relative;
}

.lang-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary, #666);
  cursor: pointer;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.lang-dropdown-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.lang-dropdown-toggle .globe-icon {
  width: 18px;
  height: 18px;
}

.lang-dropdown-toggle .arrow-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.lang-dropdown.open .arrow-icon {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 140px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.lang-dropdown.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-primary, #333);
  text-decoration: none;
  transition: background 0.2s ease;
  cursor: pointer;
}

.lang-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.lang-dropdown-item.active {
  color: var(--primary-color, #FC3130);
  font-weight: 600;
}

.lang-dropdown-item .flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.lang-dropdown-item .check-icon {
  width: 16px;
  height: 16px;
  margin-left: auto;
  opacity: 0;
}

.lang-dropdown-item.active .check-icon {
  opacity: 1;
}

/* Inline Language Links (for footer) */
.lang-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.lang-links a:hover {
  color: #fff;
}

.lang-links a.active {
  color: var(--primary-color, #FC3130);
  font-weight: 600;
}

.lang-links .separator {
  color: rgba(255, 255, 255, 0.3);
}
