@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/* 宿泊予約CTA */
.hotel-affiliate-cta {
  position: relative;
  margin: 2.5rem 0 2.25rem;
  padding: 0 1.5rem 1.5rem;
  border: 2px solid #298c60;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f2f9f6 100%);
  box-shadow: 0 8px 24px rgba(41, 140, 96, 0.14);
}

.hotel-affiliate-cta__title {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: calc(100% + 0.5rem);
  padding: 0.48rem 1rem 0.48rem 2.15rem;
  border-radius: 6px 6px 6px 0;
  background: #298c60;
  box-shadow: 0 5px 14px rgba(41, 140, 96, 0.24);
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.4;
  text-align: left;
}

/* Cocoon の .article p より詳細度を上げて余白と左寄せを確定させる */
.hotel-affiliate-cta > .hotel-affiliate-cta__title {
  margin: -1.05rem 0 1.05rem -0.25rem;
  text-align: left;
}

.hotel-affiliate-cta__title::before {
  position: absolute;
  top: calc(0.48rem + 0.7em);
  left: 0.85rem;
  width: 0;
  height: 0;
  border-top: 6px solid #fff;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: "";
  transform: translateY(-50%);
}

.hotel-affiliate-cta__note {
  margin-top: 0;
  color: #53635c;
  font-size: 0.875rem;
}

.hotel-affiliate-buttons {
  margin-top: 1.25rem;
  margin-bottom: 0;
  gap: 1rem;
}

.hotel-affiliate-buttons > .wp-block-column {
  display: flex;
}

.hotel-affiliate-button {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
}

.hotel-affiliate-button > a {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0.8rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 7px 15px rgba(41, 140, 96, 0.24);
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  vertical-align: middle;
}

.hotel-affiliate-button > a::before {
  position: absolute;
  top: -180px;
  left: 0;
  width: 30px;
  height: 100%;
  background-color: #fff;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: rotate(45deg);
  animation: hotel-affiliate-button-shine 3s ease-in-out infinite;
}

.hotel-affiliate-button > a:hover,
.hotel-affiliate-button > a:focus {
  box-shadow: 0 9px 19px rgba(41, 140, 96, 0.3);
  filter: brightness(0.97);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.hotel-affiliate-button--rakuten > a {
  background: linear-gradient(135deg, #247a54 0%, #1f6f4b 100%);
}

.hotel-affiliate-button--jalan > a {
  background: linear-gradient(135deg, #c45100 0%, #a84308 100%);
  box-shadow: 0 7px 15px rgba(196, 81, 0, 0.24);
}

.hotel-affiliate-button--jalan > a:hover,
.hotel-affiliate-button--jalan > a:focus {
  box-shadow: 0 9px 19px rgba(196, 81, 0, 0.3);
}

.hotel-affiliate-code-placeholder {
  width: 100%;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px dashed #66a98b;
  border-radius: 12px;
  background: #f2f9f6;
  color: #365548;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

@keyframes hotel-affiliate-button-shine {
  0% {
    opacity: 0;
    transform: scale(0) rotate(45deg);
  }

  80% {
    opacity: 0.5;
    transform: scale(0) rotate(45deg);
  }

  81% {
    opacity: 1;
    transform: scale(4) rotate(45deg);
  }

  100% {
    opacity: 0;
    transform: scale(50) rotate(45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hotel-affiliate-button > a {
    transition: none;
  }

  .hotel-affiliate-button > a::before {
    animation: none;
  }
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  .hotel-affiliate-cta {
    margin-top: 2.25rem;
    padding: 0 0.875rem 1.125rem;
    border-radius: 13px;
  }

  .hotel-affiliate-cta > .hotel-affiliate-cta__title {
    margin: -1rem 0 0.9rem -0.225rem;
  }

  .hotel-affiliate-cta__title {
    max-width: calc(100% + 0.45rem);
    padding: 0.45rem 0.85rem 0.45rem 2rem;
    font-size: 0.9rem;
  }

  .hotel-affiliate-cta__title::before {
    top: calc(0.45rem + 0.7em);
    left: 0.8rem;
  }

  .hotel-affiliate-buttons {
    gap: 0.75rem;
  }

  .hotel-affiliate-button > a {
    min-height: 54px;
  }
}
