@charset "UTF-8";

/* ==========================================================================
   言語切替ボタン / 言語選択モーダル
   sassのビルドを挟まないよう独立したCSSとして読み込む
   ========================================================================== */

/* 言語切替ボタン ---------------------------------------------------------- */
.c-lang {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
}

.c-lang__btn {
  display: block;
  padding: 7px 12px;
  color: #666;
  text-decoration: none;
  font-weight: bold;
  background: #fff;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.c-lang__btn + .c-lang__btn {
  border-left: 1px solid #c8c8c8;
}

.c-lang__btn:hover {
  background: #f2f2f2;
  color: #222;
}

.c-lang__btn.is-current {
  background: #222;
  color: #fff;
  cursor: default;
}

.c-lang__btn:focus-visible {
  outline: 2px solid #1f4d8f;
  outline-offset: -2px;
}

/* 登録・ログイン画面（layout/login.php）での配置 */
.c-lang--login {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

/* 必須／任意バッジ -------------------------------------------------------- */
/* register.css が content: "必須" / "任意" で出力しているため、英語表示のときだけ差し替える。
   lang.css は register.css より後に読み込まれるので上書きが効く。 */
html[lang="en"] .indispensable::after {
  content: "Required";
  width: 58px;
}

html[lang="en"] .any::after {
  content: "Optional";
  width: 58px;
}

@media screen and (max-width: 768px) {
  html[lang="en"] .indispensable::after,
  html[lang="en"] .any::after {
    width: 15vw;
  }
}

/* 言語選択モーダル -------------------------------------------------------- */
.c-langModal[hidden] {
  display: none;
}

.c-langModal {
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.72);
}

.is-langModalOpen,
.is-langModalOpen body {
  overflow: hidden;
}

.c-langModal__panel {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 26px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.c-langModal__logo {
  margin: 0 0 20px;
}

.c-langModal__logo img {
  width: 120px;
  height: auto;
}

.c-langModal__title {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.6;
  color: #222;
}

.c-langModal__title span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: normal;
  color: #777;
}

.c-langModal__btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.c-langModal__btn {
  display: block;
  padding: 14px 16px;
  border: 1px solid #222;
  border-radius: 2px;
  background: #fff;
  color: #222;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.c-langModal__btn:hover {
  background: #222;
  color: #fff;
}

.c-langModal__btn:focus-visible {
  outline: 2px solid #1f4d8f;
  outline-offset: 2px;
}

.c-langModal__note {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: #777;
  text-align: left;
}

.c-langModal__note span {
  display: block;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .c-langModal__panel {
    padding: 26px 20px 22px;
  }

  .c-lang--login {
    top: 10px;
    right: 10px;
  }
}
