/* language-switcher.css */



/* 言語切り替えボタンコンテナ */
.language-switcher {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 1000;
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* ボタンスタイル */
.lang-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  margin: 0 2px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

/* ホバー効果 */
.lang-btn:hover {
  color: #333;
  background: rgba(102, 102, 102, 0.1);
}

/* アクティブ状態 */
.lang-btn.active {
  background: #666;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

/* フォーカス状態（アクセシビリティ） */
.lang-btn:focus {
  outline: 2px solid #666;
  outline-offset: 2px;
}

/* スマートフォン対応 */
@media (max-width: 768px) {
  .language-switcher {
    top: 15px;
    right: 15px;
    padding: 3px;
  }

  .lang-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* タブレット対応 */
@media screen and (min-width: 1024px) and (max-width: 1679px) {
    .language-switcher {
    top: 78px;
    right: 18px;
  }
}

@media (max-width: 1023px) and (min-width: 769px) {
  .language-switcher {
    top: 18px;
    right: 18px;
  }
}

/* ハンバーガーメニューとの調整 */
@media (max-width: 1023px) {
  .language-switcher {
    right: 70px; /* ハンバーガーメニューボタンとの距離 */
  }
}

/* ローディング状態 */
.lang-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.lang-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 言語固有要素の表示制御 */
.ja-only {
  display: block;
}

.en-only {
  display: none;
}

[lang="en"] .ja-only {
  display: none;
}

[lang="en"] .en-only {
  display: block;
}

/* アニメーション効果 */
[data-translate] {
  transition: opacity 0.2s ease;
}

.language-switching [data-translate] {
  opacity: 0.7;
}

/* 印刷時の調整 */
@media print {
  .language-switcher {
    display: none;
  }

  .en-only {
    display: none !important;
  }

  .ja-only {
    display: block !important;
  }
}