/* キャンペーン告知モーダル（/campaign-modal/）
   値は DESIGN.md の変数を使う。余白8px単位・文字4の倍数・角丸8px以下 */

.gz-cpmodal[hidden] {
  display: none;
}

.gz-cpmodal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-200);
}

.gz-cpmodal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--monotone-700);
  opacity: 0.72;
}

.gz-cpmodal__dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--space-200) var(--space-200);
  background: var(--white);
  border-radius: 8px;
}

.gz-cpmodal__dialog:focus {
  outline: none;
}

.gz-cpmodal__head {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-100) 0;
}

.gz-cpmodal__close {
  position: relative;
  width: 40px;
  height: 40px;
  margin-right: calc(var(--space-100) * -1);
  padding: 0;
  background: var(--white);
  border: 1px solid var(--border-line);
  border-radius: 50%;
  cursor: pointer;
}

.gz-cpmodal__close::before,
.gz-cpmodal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: var(--section-headline);
}

.gz-cpmodal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.gz-cpmodal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.gz-cpmodal__close:focus-visible,
.gz-cpmodal__btn:focus-visible {
  outline: 2px solid var(--primary-800);
  outline-offset: 2px;
}

.gz-cpmodal__image {
  display: block;
}

.gz-cpmodal__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.gz-cpmodal__btn {
  display: block;
  margin-top: var(--space-200);
  padding: var(--space-100) var(--space-400);
  background: var(--primary-700);
  border-radius: 4px;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s;
}

.gz-cpmodal__btn:hover {
  background: var(--primary-800);
}

html.gz-cpmodal-open,
html.gz-cpmodal-open body {
  overflow: hidden;
}
