/*
Theme Name: GOT LP Theme
Theme URI: https://example.com/
Author: GOT
Author URI: https://example.com/
Description: LP運用向けの投稿ページ専用テーマ。PC最大750px、SP全幅、投稿ごとのヘッダー/フッター選択、GTM設定、追加CSS/JS、閉鎖日時リダイレクト、ドラッグ式LPビルダー、LP用ショートコードを搭載。
Version: 1.3.9
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: got-lp-theme
*/

:root {
  --got-lp-content-width: 750px;
  --got-lp-text-color: #222222;
  --got-lp-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --got-lp-bg-color: #ffffff;
  --got-lp-page-bg-color: #ffffff;
  --got-lp-page-bg-image: none;
  --got-lp-page-bg-size: auto;
  --got-lp-content-bg-color: transparent;
  --got-lp-content-bg-image: none;
  --got-lp-content-bg-size: auto;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background-color: var(--got-lp-page-bg-color, var(--got-lp-bg-color));
  background-image: var(--got-lp-page-bg-image, none);
  background-repeat: repeat;
  background-position: top center;
  background-size: var(--got-lp-page-bg-size, auto);
  color: var(--got-lp-text-color);
  font-family: var(--got-lp-font-family);
  line-height: 1.75;
}

a {
  color: inherit;
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
  vertical-align: bottom;
}

.got-lp-site {
  width: 100%;
  min-height: 100vh;
}

.got-lp-container {
  width: min(100%, var(--got-lp-content-width));
  margin-right: auto;
  margin-left: auto;
  background-color: var(--got-lp-content-bg-color, transparent);
  background-image: var(--got-lp-content-bg-image, none);
  background-repeat: repeat;
  background-position: top center;
  background-size: var(--got-lp-content-bg-size, auto);
}

.got-lp-content {
  width: 100%;
  overflow-wrap: anywhere;
}

.got-lp-content > *:first-child {
  margin-top: 0;
}

.got-lp-content > *:last-child {
  margin-bottom: 0;
}

.got-lp-content[data-got-lp-popup-spacer="1"] {
  transition: padding-bottom .2s ease;
}

.got-lp-header,
.got-lp-footer {
  width: 100%;
}

.got-lp-fragment {
  width: min(100%, var(--got-lp-content-width));
  margin-right: auto;
  margin-left: auto;
  background-color: var(--got-lp-content-bg-color, transparent);
  background-image: var(--got-lp-content-bg-image, none);
  background-repeat: repeat;
  background-position: top center;
  background-size: var(--got-lp-content-bg-size, auto);
}

.got-lp-fragment > *:first-child {
  margin-top: 0;
}

.got-lp-fragment > *:last-child {
  margin-bottom: 0;
}

.got-lp-no-selection {
  display: none;
}

/* LP parts */
.got-lp-columns {
  display: grid;
  gap: var(--got-lp-columns-gap, 20px);
  margin: 1.5em 0;
}

.got-lp-columns--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.got-lp-columns--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.got-lp-column > *:first-child {
  margin-top: 0;
}

.got-lp-column > *:last-child {
  margin-bottom: 0;
}

.got-lp-button-wrap {
  margin: 1.5em 0;
  text-align: center;
}

.got-lp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  max-width: 100%;
  padding: 14px 28px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, opacity .2s ease;
}

.got-lp-button:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.got-lp-button--pulse {
  animation: gotLpPulse 1.6s ease-in-out infinite;
}

.got-lp-button--bounce {
  animation: gotLpBounce 1.8s ease-in-out infinite;
}

.got-lp-button--float {
  animation: gotLpFloat 2s ease-in-out infinite;
}

.got-lp-button--shine::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: rotate(25deg);
  animation: gotLpShine 2.2s ease-in-out infinite;
}

.got-lp-image-wrap {
  margin: 1.5em 0;
}

.got-lp-image-wrap.align-center {
  text-align: center;
}

.got-lp-image-wrap.align-left {
  text-align: left;
}

.got-lp-image-wrap.align-right {
  text-align: right;
}

.got-lp-image {
  display: inline-block;
  max-width: 100%;
}

@keyframes gotLpPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes gotLpBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes gotLpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes gotLpShine {
  0% { left: -75%; }
  45%, 100% { left: 125%; }
}

@media (max-width: 767px) {
  .got-lp-container,
  .got-lp-fragment {
    width: 100%;
  }

  .got-lp-columns,
  .got-lp-columns--2,
  .got-lp-columns--3 {
    grid-template-columns: 1fr;
  }

  .got-lp-button {
    width: min(92vw, 420px);
  }
}


/* Drag builder generated parts */
.got-lp-heading {
  line-height: 1.35;
  margin: 1.4em 0 .7em;
}

.got-lp-text {
  margin: 1.2em 0;
}

.got-lp-text > *:first-child,
.got-lp-section > *:first-child {
  margin-top: 0;
}

.got-lp-text > *:last-child,
.got-lp-section > *:last-child {
  margin-bottom: 0;
}

.got-lp-align-left {
  text-align: left;
}

.got-lp-align-center {
  text-align: center;
}

.got-lp-align-right {
  text-align: right;
}

.got-lp-section {
  margin: 1.5em 0;
  border-radius: 0;
}

.got-lp-spacer {
  display: block;
  width: 100%;
}

/* LP popup button */
.got-lp-popup-button {
  position: fixed;
  right: max(0px, var(--got-lp-popup-margin-right, 16px));
  bottom: 24px;
  left: max(0px, var(--got-lp-popup-margin-left, 16px));
  z-index: 99990;
  display: flex;
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity .35s ease, visibility .35s ease, transform .35s ease;
}

.got-lp-popup-button.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.got-lp-popup-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, max(0px, calc(var(--got-lp-content-width) - var(--got-lp-popup-margin-left, 16px) - var(--got-lp-popup-margin-right, 16px))));
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  position: relative;
}

.got-lp-popup-button__image {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
}

.got-lp-popup-button__html {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  max-width: 100%;
  padding: 14px 28px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.got-lp-popup-button--fade.is-visible {
  animation: gotLpPopupFade .45s ease both;
}

.got-lp-popup-button--pop.is-visible .got-lp-popup-button__link {
  animation: gotLpPopupPop .52s cubic-bezier(.2, 1.35, .35, 1) both;
}

.got-lp-popup-button--shine .got-lp-popup-button__link {
  overflow: hidden;
}

.got-lp-popup-button--shine .got-lp-popup-button__link::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -80%;
  width: 42%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  transform: rotate(25deg);
  animation: gotLpPopupShine 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gotLpPopupFade {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gotLpPopupPop {
  0% { transform: scale(.82); }
  60% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

@keyframes gotLpPopupShine {
  0% { left: -80%; }
  45%, 100% { left: 130%; }
}

@media (max-width: 767px) {
  .got-lp-popup-button {
    right: max(0px, var(--got-lp-popup-margin-right, 10px));
    bottom: 14px;
    left: max(0px, var(--got-lp-popup-margin-left, 10px));
    padding-right: 0;
    padding-left: 0;
  }

  .got-lp-popup-button__html {
    min-width: 180px;
    padding: 12px 22px;
  }
}

/* LP scroll popup */
.got-lp-scroll-popup {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}

.got-lp-scroll-popup.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.got-lp-scroll-popup::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
}

.got-lp-scroll-popup__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 28px 24px 24px;
  border-radius: 18px;
  background: #ffffff;
  color: #222222;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  transform: translateY(22px) scale(.98);
  transition: transform .35s ease;
}

.got-lp-scroll-popup.is-visible .got-lp-scroll-popup__panel {
  transform: translateY(0) scale(1);
}

.got-lp-scroll-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  color: #111111;
  font-size: 22px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
}

.got-lp-scroll-popup__content {
  display: grid;
  gap: 14px;
}

.got-lp-scroll-popup__block--image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}

.got-lp-scroll-popup__block--text p {
  margin-top: 0;
  margin-bottom: .85em;
}

.got-lp-scroll-popup__block--text p:last-child {
  margin-bottom: 0;
}

.got-lp-scroll-popup__block--button {
  text-align: center;
}

.got-lp-scroll-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.got-lp-scroll-popup--fade.is-visible .got-lp-scroll-popup__panel {
  animation: gotLpScrollPopupFade .38s ease both;
}

.got-lp-scroll-popup--pop.is-visible .got-lp-scroll-popup__panel {
  animation: gotLpScrollPopupPop .48s cubic-bezier(.2, 1.35, .35, 1) both;
}

.got-lp-scroll-popup--shine .got-lp-scroll-popup__panel::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -70%;
  width: 42%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent);
  transform: rotate(25deg);
  animation: gotLpScrollPopupShine 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gotLpScrollPopupFade {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gotLpScrollPopupPop {
  0% { transform: translateY(12px) scale(.82); }
  60% { transform: translateY(0) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes gotLpScrollPopupShine {
  0% { left: -70%; }
  45%, 100% { left: 130%; }
}

@media (max-width: 767px) {
  .got-lp-scroll-popup {
    padding: 14px;
  }
  .got-lp-scroll-popup__panel {
    width: 94vw;
    padding: 24px 18px 20px;
    border-radius: 16px;
  }
}
