/**
 * 固定バナーフロントエンドスタイル
 *
 * @format
 */

.fixed-banner {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.fixed-banner.banner-top {
  top: 0;
}

.fixed-banner.banner-bottom {
  bottom: 0;
}

.banner-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
}

.banner-link {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 19px;
  justify-content: center;
}
.banner-link svg {
  margin-right: 10px;
}

.banner-link:hover {
  opacity: 0.9;
}

.banner-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: inherit;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.banner-close:hover {
  opacity: 1;
}

.has-banner.banner-bottom {
  padding-bottom: 60px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .fixed-banner {
    font-size: 14px;
  }

  .banner-content {
    padding: 0 30px;
  }

  .banner-close {
    right: 5px;
    font-size: 18px;
  }

  .has-banner.banner-top {
    padding-top: 50px;
  }

  .has-banner.banner-bottom {
    padding-bottom: 50px;
  }
}

@media (max-width: 480px) {
  .fixed-banner {
    font-size: 12px;
  }

  .banner-content {
    padding: 0 25px;
  }

  .has-banner.banner-top {
    padding-top: 80px;
  }

  .has-banner.banner-bottom {
    padding-bottom: 45px;
  }
}

/* アニメーション */
.fixed-banner.banner-hidden {
  transform: translateY(-100%);
}

.fixed-banner.banner-bottom.banner-hidden {
  transform: translateY(100%);
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .fixed-banner {
    border: 2px solid currentColor;
  }
}

/* モーション軽減設定 */
@media (prefers-reduced-motion: reduce) {
  .fixed-banner,
  .banner-close {
    transition: none;
  }
}

/* ヘッダー固定時の対応 */
.layout-header {
  z-index: 9999;
}

/* バナーが表示されている場合のヘッダー調整 */
.has-banner .layout-header {
  margin-top: 60px;
}
.layout-container.banner_top {
  padding-top: 0;
}
.banner_top .layout-header {
  position: fixed;
}

/* モバイルメニューが開いている場合の調整 */
.has-banner .menu.js-menu {
  position: absolute;
  z-index: 10001;
  right: 10px;
  top: 20px;
}
