/* Cookie Consent Unified Styles */
.cookie-consent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  font-size: 14px;
  text-align: center;
  color: #fff;
  background: rgba(62, 64, 100, 0.7);
  padding: 1.2em;
  box-sizing: border-box;
  visibility: hidden;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.cookie-consent.is-show {
  visibility: visible;
}

.cookie-text {
  margin: auto;
  margin-bottom: 8px;
}

.cookie-text a {
  color: #ff815b !important;
  text-decoration: underline;
}

.cookie-text a:hover {
  color: #cccccc;
}

.policy-link {
  margin: 0 4px;
}

/* Cookie Consent Buttons - 統一スタイル */
.cookie-agree.custom-btn,
.cookie-reject.custom-btn {
  background-color: #000000 !important; /* 黒背景 */
  color: #ffffff !important; /* 白テキスト */
  border: 2px solid rgba(255, 255, 255, 0.3) !important; /* 薄い白のボーダーを追加 */
  transition: all 0.5s ease !important; /* 統一されたtransition時間 */
  width: 130px !important;
  height: 40px !important;
  border-radius: 5px !important;
  padding: 0 !important; /* paddingを0にしてspanで調整 */
  font-weight: 500 !important;
  cursor: pointer !important;
  position: relative !important; /* 子要素のposition: absoluteの基準 */
  display: inline-flex !important; /* flexboxで中央揃え */
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important; /* ボーダーアニメーションがはみ出さないように */
  box-shadow: none !important; /* box-shadowも削除 */
  outline: none !important;
  z-index: 1 !important; /* z-indexを設定 */
}

.cookie-agree.custom-btn:hover,
.cookie-reject.custom-btn:hover {
  background-color: transparent !important; /* ホバー時は透明に */
  color: #ffffff !important; /* テキスト色は白を維持 */
  transform: translateY(-1px) !important; /* わずかな浮き上がり */
  border: none !important; /* ホバー時にボーダーを非表示 */
}

.cookie-agree.custom-btn .button-text,
.cookie-reject.custom-btn .button-text {
  color: #ffffff !important; /* テキスト色は白を維持 */
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 40px !important; /* ボタンの高さに合わせて調整 */
  text-align: center !important;
  z-index: 2 !important; /* テキストをボーダーより前面に */
}

/* ボーダーアニメーション要素の共通スタイル */
.cookie-agree.custom-btn span[class*="border-"],
.cookie-reject.custom-btn span[class*="border-"] {
  position: absolute !important;
  background: #ffffff !important; /* 白いボーダー */
  transition: all 0.5s ease !important;
  z-index: 0 !important; /* ボーダーをテキストより背面に */
}

/* 上ボーダー */
.cookie-agree.custom-btn .border-top,
.cookie-reject.custom-btn .border-top {
  top: 0 !important;
  left: 0 !important;
  width: 0% !important;
  height: 2px !important;
}

/* 右ボーダー */
.cookie-agree.custom-btn .border-right,
.cookie-reject.custom-btn .border-right {
  top: 0 !important;
  right: 0 !important;
  width: 2px !important;
  height: 0% !important;
}

/* 下ボーダー */
.cookie-agree.custom-btn .border-bottom,
.cookie-reject.custom-btn .border-bottom {
  bottom: 0 !important;
  left: 0 !important;
  width: 0% !important;
  height: 2px !important;
}

/* 左ボーダー */
.cookie-agree.custom-btn .border-left,
.cookie-reject.custom-btn .border-left {
  left: 0 !important;
  width: 2px !important;
  height: 0% !important;
  top: 0 !important;
}

/* ホバー時のボーダーアニメーション */
.cookie-agree.custom-btn:hover .border-top,
.cookie-reject.custom-btn:hover .border-top {
  width: 100% !important;
}

.cookie-agree.custom-btn:hover .border-right,
.cookie-reject.custom-btn:hover .border-right {
  height: 100% !important;
}

.cookie-agree.custom-btn:hover .border-bottom,
.cookie-reject.custom-btn:hover .border-bottom {
  width: 100% !important;
}

.cookie-agree.custom-btn:hover .border-left,
.cookie-reject.custom-btn:hover .border-left {
  height: 100% !important;
}  /* btn-4クラスの白いボックスアニメーションを無効化 */

/* レスポンシブ対応 */
@media screen and (max-width: 600px) {
  .cookie-consent {
    flex-direction: column;
    padding: 1em;
  }

  .cookie-text {
    margin-bottom: 1em;
  }

  .cookie-agree.custom-btn,
  .cookie-reject.custom-btn {
    width: 120px;
    margin: 0.25rem;
  }
}

@media screen and (max-width: 480px) {
  .cookie-consent {
    font-size: 12px;
  }

  .cookie-agree.custom-btn,
  .cookie-reject.custom-btn {
    width: 100px;
    height: 35px;
    font-size: 12px;
    padding: 8px 15px;
  }
}
