/*
 * custom.css
 * wp-style.css (Tailwind コンパイル済み) に存在しない
 * ユーティリティクラスを補完する。
 */

/* ── Cookie バナー ── */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(33, 33, 33, 0.97);
  color: #fff;
  font-family: inherit;
}
#cookie-banner-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
#cookie-banner p {
  font-size: 0.75rem;
  line-height: 1.6;
  flex: 1;
  min-width: 200px;
  margin: 0;
}
#cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}
#cookie-privacy-link {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: underline;
}
#cookie-privacy-link:hover {
  color: #d1d5db;
}
#cookie-accept-btn,
#cookie-decline-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 1.25rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
#cookie-accept-btn {
  background: #fff;
  color: #212121;
}
#cookie-accept-btn:hover {
  background: #f3f4f6;
}
#cookie-decline-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
#cookie-decline-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── ボーダーカラー ── */
.border-gray-200 { border-color: rgb(229 231 235); }

/* ── ヒーロー高さ（CLS 防止）
       JS で window.innerHeight - マージン を計算して
       --hero-h カスタムプロパティに書き込む。
       フォールバックとして 100svh / calc(100svh - 200px) を指定。 ── */
.hero-min-h {
  min-height: var(--hero-h, calc(100svh - 300px));
}
@media (min-width: 1024px) {
  .hero-min-h {
    min-height: var(--hero-h, calc(100svh - 360px));
  }
}

/* ── .btn の overflow:hidden はブロック / インラインブロック要素でのみ有効。
       flex コンテナ内の子や inline-block に適用済みの場合は問題ないが、
       念のため .btn に display:inline-block を追加して確実に動作させる ── */
.btn {
  display: inline-block;
}

/* ── Hero: lottie SVG をコンテナに全面フィルさせ、
          テキストをオーバーレイで中央配置する
          高さは JS が --hero-h にセットする ── */
#animation {
  height: var(--hero-h, calc(100svh - 300px));
}
@media (min-width: 1024px) {
  #animation {
    height: var(--hero-h, calc(100svh - 360px));
  }
}
#animation > svg {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
/* テキストを中央に固定 */
#animation > h1,
#animation > p {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  box-sizing: border-box;
  z-index: 10;
}

/* 決算公告 BS テーブル：左右セクション間に縦罫線・余白を確保 */
.bs-table td:nth-child(3),
.bs-table th:nth-child(3) {
  border-left: 1px solid #e5e7eb;
  padding-left: 1.5rem;
}
.bs-table th:nth-child(2),
.bs-table td:nth-child(2) {
  padding-right: 1.5rem;
}

/* 言語スイッチャー（ピルトグル） */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background-color: var(--grey-very-light);
  border-radius: 9999px;
  padding: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  user-select: none;
}
.lang-switch a {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 9999px;
  color: #9ca3af;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}
.lang-switch a:hover {
  color: #4b5563;
}
.lang-switch a.is-active {
  background-color: white;
  color: var(--dark);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  cursor: default;
}
