@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
*/

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

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

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

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

/* Codex reader-matched Amazon ad design start */
.entry-content .codex-amazon-ad,
.article .codex-amazon-ad {
  margin: 1.8em 0;
  border: 1px solid #dde7e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(31, 41, 55, 0.08);
  overflow: hidden;
}

.entry-content .codex-amazon-ad__body,
.article .codex-amazon-ad__body {
  padding: 1.05em;
}

.entry-content .codex-amazon-ad__eyebrow,
.article .codex-amazon-ad__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 1.7em;
  margin: 0 0 0.55em;
  padding: 0.16em 0.58em;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.35;
}

.entry-content .codex-amazon-ad__title,
.article .codex-amazon-ad__title {
  margin: 0 0 0.85em;
  color: #111827;
  font-size: 1.02em;
  font-weight: 700;
  line-height: 1.55;
}

.entry-content .codex-amazon-ad__text,
.article .codex-amazon-ad__text {
  margin: 0 0 0.95em;
  color: #374151;
  line-height: 1.75;
}

.entry-content .codex-amazon-ad__grid,
.article .codex-amazon-ad__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85em;
}

.entry-content .codex-amazon-ad__item,
.article .codex-amazon-ad__item {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  padding: 0.85em;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: inherit;
  background: #fafafa;
  text-decoration: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.entry-content .codex-amazon-ad__item:hover,
.article .codex-amazon-ad__item:hover,
.entry-content .codex-amazon-ad__item:focus-visible,
.article .codex-amazon-ad__item:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.entry-content .codex-amazon-ad__image,
.article .codex-amazon-ad__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.7em;
  border-radius: 6px;
  background: #ffffff;
}

.entry-content .codex-amazon-ad__image img,
.article .codex-amazon-ad__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.entry-content .codex-amazon-ad__item-title,
.article .codex-amazon-ad__item-title {
  display: -webkit-box;
  min-height: 3.3em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #111827;
  font-size: 0.92em;
  font-weight: 700;
  line-height: 1.65;
}

.entry-content .codex-amazon-ad__item-feature,
.article .codex-amazon-ad__item-feature {
  display: -webkit-box;
  min-height: 3.2em;
  margin-top: 0.45em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #4b5563;
  font-size: 0.84em;
  line-height: 1.6;
}

.entry-content .codex-amazon-ad__button,
.article .codex-amazon-ad__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7em;
  margin-top: 0.8em;
  padding: 0.48em 0.85em;
  border-radius: 6px;
  color: #ffffff !important;
  background: #2563eb;
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.entry-content .codex-amazon-ad__note,
.article .codex-amazon-ad__note {
  margin: 0.85em 0 0;
  color: #6b7280;
  font-size: 0.82em;
  line-height: 1.65;
}

.entry-content .codex-amazon-ad--fallback .codex-amazon-ad__body,
.article .codex-amazon-ad--fallback .codex-amazon-ad__body {
  display: grid;
  gap: 0.35em;
}

.entry-content .codex-amazon-ad--fallback .codex-amazon-ad__button,
.article .codex-amazon-ad--fallback .codex-amazon-ad__button {
  justify-self: start;
}

@media (max-width: 760px) {
  .entry-content .codex-amazon-ad__grid,
  .article .codex-amazon-ad__grid {
    grid-template-columns: 1fr;
  }

  .entry-content .codex-amazon-ad__item,
  .article .codex-amazon-ad__item {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 0.85em;
  }

  .entry-content .codex-amazon-ad__image,
  .article .codex-amazon-ad__image {
    grid-row: 1 / 4;
    margin: 0;
    aspect-ratio: 1 / 1;
  }

  .entry-content .codex-amazon-ad__button,
  .article .codex-amazon-ad__button {
    justify-self: start;
  }
}
/* Codex reader-matched Amazon ad design end */
