/**
 * Pocket Monster native Gutenberg block styles.
 *
 * Keep these selectors tied to explicit block style classes so ordinary
 * Gutenberg and WooCommerce buttons remain under Botiga's control.
 */

/* Design tokens are inherited from pm-global.css in the editor and frontend. */

/* Shared Pokéball CTA foundation. */
.wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link,
.wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 76px 14px 30px;
  border: 0;
  border-radius: var(--pm-radius-button, 999px);
  background-image: url("../img/pokeball.svg");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 40px 40px;
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: none;
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

/*
 * Botiga's generic button colors load after block assets. The extra
 * .wp-block-buttons scope keeps these explicit variations authoritative
 * without using !important.
 */
.wp-block-buttons > .wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link,
.wp-block-buttons > .wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link:visited {
  background-color: var(--pm-yellow);
  color: var(--pm-dark);
}

.wp-block-buttons > .wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link,
.wp-block-buttons > .wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link:visited {
  background-color: var(--pm-blue);
  color: var(--pm-white);
}

.wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link:hover,
.wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
  text-decoration: none;
}

.wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link:focus,
.wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link:focus {
  text-decoration: none;
}

.wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link:focus-visible {
  outline: 3px solid var(--pm-blue);
  outline-offset: 3px;
}

.wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link:focus-visible {
  outline: 3px solid var(--pm-yellow);
  outline-offset: 3px;
}

.wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link[aria-disabled="true"],
.wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link[aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.6;
  transform: none;
}

/*
 * The two grey dividers reuse the exact irregular silhouettes from the
 * product tabs. They are deliberately different, avoiding a repeated
 * triangle pattern and creating the established hand-cut visual rhythm.
 */
.wp-block-separator.is-style-pm-grey-teeth-top,
.wp-block-separator.is-style-pm-grey-teeth-bottom {
  position: relative;
  left: 50%;
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  transform: translateX(-50%);
  border: 0;
  background: var(--pm-grey-dark);
  color: transparent;
  opacity: 1;
}

.wp-block-separator.is-style-pm-grey-teeth-top {
  height: 106px;
  clip-path: polygon(
    0 86%,
    8% 54%,
    18% 76%,
    31% 28%,
    44% 82%,
    59% 18%,
    74% 72%,
    88% 38%,
    100% 80%,
    100% 100%,
    0 100%
  );
}

.wp-block-separator.is-style-pm-grey-teeth-bottom {
  height: 134px;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 50%,
    97% 38%,
    94% 78%,
    91% 84%,
    88% 28%,
    84% 20%,
    80% 72%,
    76% 82%,
    71% 34%,
    67% 90%,
    63% 96%,
    58% 40%,
    54% 28%,
    49% 88%,
    45% 96%,
    39% 42%,
    34% 18%,
    29% 70%,
    25% 82%,
    19% 26%,
    15% 14%,
    11% 76%,
    7% 68%,
    3% 34%,
    0 58%
  );
}

/*
 * A one-pixel overlap prevents sub-pixel anti-aliasing from drawing a dark
 * hairline where the irregular separators meet their grey content section.
 */
.pm-jagged-section > .is-style-pm-grey-teeth-top {
  margin-bottom: -1px;
}

.pm-jagged-section > .is-style-pm-grey-teeth-bottom {
  margin-top: -1px;
}

/* Information-page dividers match the shop's more compact silhouette. */
:is(.pm-info-page, .pm-contact-faq-band) .wp-block-separator:is(.is-style-pm-grey-teeth-top, .is-style-pm-grey-teeth-bottom) {
  height: 65px;
}
@media (max-width: 575px) {
  :is(.pm-info-page, .pm-contact-faq-band) .wp-block-separator:is(.is-style-pm-grey-teeth-top, .is-style-pm-grey-teeth-bottom) {
    height: 38px;
  }
}

/*
 * Split hero patterns.
 *
 * They deliberately follow the established category hero. The two variants
 * only change source order, so mobile keeps the chosen image/text order
 * without JavaScript or duplicated responsive markup.
 */
.pm-hero-pattern {
  position: relative;
  overflow: hidden;
  background: var(--pm-dark);
  color: var(--pm-white);
}

.pm-hero-pattern > .pm-hero-pattern__columns {
  position: relative;
  gap: 0;
  min-height: clamp(360px, 25vw, 480px);
  margin: 0;
  overflow: hidden;
  background: var(--pm-dark);
}

.pm-hero-pattern > .pm-hero-pattern__columns::before,
.pm-hero-pattern > .pm-hero-pattern__columns::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.pm-hero-pattern > .pm-hero-pattern__columns::before {
  z-index: 2;
  left: calc(43% - 95px);
  width: 260px;
  background: var(--pm-decoration-grey);
  clip-path: polygon(0 0, 72% 0, 100% 50%, 52% 100%, 0 100%);
}

.pm-hero-pattern > .pm-hero-pattern__columns::after {
  z-index: 3;
  left: calc(43% - 82px);
  width: 220px;
  background: var(--pm-panel);
  clip-path: polygon(0 0, 70% 0, 100% 50%, 50% 100%, 0 100%);
}

.pm-hero-pattern--image-first > .pm-hero-pattern__columns::before {
  right: calc(43% - 95px);
  left: auto;
  transform: scaleX(-1);
}

.pm-hero-pattern--image-first > .pm-hero-pattern__columns::after {
  right: calc(43% - 82px);
  left: auto;
  transform: scaleX(-1);
}

.pm-hero-pattern__content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(56px, 6vw, 96px) clamp(40px, 5vw, 84px);
  background: var(--pm-panel);
}

.pm-hero-pattern--text-first .pm-hero-pattern__content {
  padding-left: max(32px, calc((100vw - 1440px) / 2 + 32px));
}

.pm-hero-pattern--image-first .pm-hero-pattern__content {
  padding-right: max(32px, calc((100vw - 1440px) / 2 + 32px));
}

.pm-hero-pattern__eyebrow,
.pm-cta-panel__eyebrow {
  margin: 0 0 14px;
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pm-hero-pattern__title {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--pm-white);
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: clamp(42px, 4.8vw, 68px);
  font-weight: 900;
  line-height: 0.98;
  text-transform: uppercase;
}

.pm-hero-pattern__title mark {
  font: inherit;
}

.pm-hero-pattern__text {
  max-width: 620px;
  margin: 0;
  color: var(--pm-white);
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: clamp(17px, 1.25vw, 20px);
  font-weight: 300;
  line-height: 1.55;
}

.pm-hero-pattern__content > .wp-block-buttons {
  margin: 30px 0 0;
}

.pm-hero-pattern__media {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--pm-dark);
}

.pm-hero-pattern__image {
  width: 100%;
  height: 100%;
  margin: 0;
}

.pm-hero-pattern__image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(360px, 25vw, 480px);
  object-fit: cover;
  object-position: center;
}

/* Compact, high-contrast CTA pattern. */
.pm-cta-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(46px, 6vw, 74px) clamp(24px, 5vw, 72px);
  background: var(--pm-blue);
  color: var(--pm-white);
}

.pm-cta-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: clamp(-92px, -5vw, -46px);
  bottom: -96px;
  width: 250px;
  height: 250px;
  background: url("../img/pokeball.svg") center / contain no-repeat;
  opacity: 0.09;
  transform: rotate(-12deg);
  pointer-events: none;
}

.pm-cta-panel__eyebrow {
  color: var(--pm-yellow);
}

.pm-cta-panel__title {
  margin: 0 0 16px;
  color: var(--pm-white);
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.05;
}

.pm-cta-panel__text {
  max-width: 720px;
  margin: 0 auto 28px;
  color: var(--pm-white);
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 300;
  line-height: 1.55;
}

@media (max-width: 991px) {
  .pm-hero-pattern > .pm-hero-pattern__columns {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .pm-hero-pattern > .pm-hero-pattern__columns::before,
  .pm-hero-pattern > .pm-hero-pattern__columns::after {
    display: none;
  }

  .pm-hero-pattern__content,
  .pm-hero-pattern__media {
    flex-basis: auto !important;
  }

  .pm-hero-pattern__content,
  .pm-hero-pattern--text-first .pm-hero-pattern__content,
  .pm-hero-pattern--image-first .pm-hero-pattern__content {
    padding: 34px 20px 30px;
  }

  .pm-hero-pattern__title {
    font-size: clamp(34px, 6vw, 52px);
    line-height: 1.05;
  }

  .pm-hero-pattern__media,
  .pm-hero-pattern__image img {
    min-height: 260px;
    max-height: 380px;
  }

  .pm-cta-panel {
    width: auto;
    max-width: none;
    margin-right: 14px;
    margin-left: 14px;
  }
}

@media (max-width: 575px) {
  .pm-hero-pattern__content,
  .pm-hero-pattern--text-first .pm-hero-pattern__content,
  .pm-hero-pattern--image-first .pm-hero-pattern__content {
    padding: 28px 14px 24px;
  }

  .pm-hero-pattern__title {
    margin-bottom: 18px;
    font-size: 34px;
  }

  .pm-hero-pattern__text {
    font-size: 15px;
    line-height: 1.5;
  }

  .pm-hero-pattern__content > .wp-block-buttons {
    margin-top: 24px;
  }

  .pm-hero-pattern__media,
  .pm-hero-pattern__image img {
    min-height: 210px;
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .wp-block-group.pm-cta-panel {
    padding: 44px 30px;
  }

  .pm-cta-panel::after {
    right: -82px;
    bottom: -76px;
    width: 210px;
    height: 210px;
  }
}

/* Native Gutenberg details styled as the Pocket Monster accordion. */
.pm-accordion-group {
  box-sizing: border-box;
  padding: clamp(42px, 6vw, 72px) clamp(20px, 3vw, 30px);
}

.pm-accordion-group__title {
  margin: 0 0 24px;
  color: var(--pm-white);
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 900;
  line-height: 1.1;
}

.wp-block-details.is-style-pm-blue-accordion {
  overflow: hidden;
  margin: 0 0 10px;
  border: 0;
  background: var(--pm-panel);
  color: var(--pm-white);
}

.wp-block-details.is-style-pm-blue-accordion:last-child {
  margin-bottom: 0;
}

.wp-block-details.is-style-pm-blue-accordion > summary {
  position: relative;
  display: flex;
  min-height: 58px;
  box-sizing: border-box;
  align-items: center;
  padding: 15px 58px 15px 22px;
  background: var(--pm-blue);
  color: var(--pm-white);
  font-family: var(--pm-font-main, "Lato", Arial, sans-serif);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 900;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease;
}

.wp-block-details.is-style-pm-blue-accordion > summary::-webkit-details-marker {
  display: none;
}

.wp-block-details.is-style-pm-blue-accordion > summary::before,
.wp-block-details.is-style-pm-blue-accordion > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 18px;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
  transform-origin: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.wp-block-details.is-style-pm-blue-accordion > summary::after {
  transform: translateY(-50%) rotate(90deg);
}

.wp-block-details.is-style-pm-blue-accordion[open] > summary::after {
  opacity: 0;
  transform: translateY(-50%) rotate(90deg) scaleX(0);
}

.wp-block-details.is-style-pm-blue-accordion > summary:hover {
  background: var(--pm-blue-accordion-hover);
}

.wp-block-details.is-style-pm-blue-accordion > summary:focus-visible {
  z-index: 1;
  outline: 3px solid var(--pm-yellow);
  outline-offset: -3px;
}

.wp-block-details.is-style-pm-blue-accordion > :not(summary) {
  margin-right: 22px;
  margin-left: 22px;
}

.wp-block-details.is-style-pm-blue-accordion > summary + * {
  margin-top: 22px;
}

.wp-block-details.is-style-pm-blue-accordion > :last-child:not(summary) {
  margin-bottom: 24px;
}

.wp-block-details.is-style-pm-blue-accordion a {
  color: var(--pm-yellow);
  text-underline-offset: 0.16em;
}

@media (max-width: 575px) {
  .pm-accordion-group {
    padding: 38px 20px;
  }

  .pm-accordion-group__title {
    margin-bottom: 20px;
    font-size: 30px;
  }

  .wp-block-details.is-style-pm-blue-accordion > summary {
    min-height: 56px;
    padding: 14px 52px 14px 18px;
    font-size: 16px;
  }

  .wp-block-details.is-style-pm-blue-accordion > summary::before,
  .wp-block-details.is-style-pm-blue-accordion > summary::after {
    right: 18px;
    width: 16px;
  }

  .wp-block-details.is-style-pm-blue-accordion > :not(summary) {
    margin-right: 18px;
    margin-left: 18px;
  }

  .wp-block-details.is-style-pm-blue-accordion > summary + * {
    margin-top: 18px;
  }

  .wp-block-details.is-style-pm-blue-accordion > :last-child:not(summary) {
    margin-bottom: 20px;
  }
}

/* Draft component gallery only; removed together with the preview route. */
body.pm-block-library-preview-page .container.content-wrapper,
body.pm-block-library-preview-page .content-area,
body.pm-block-library-preview-page #primary {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

body.pm-block-library-preview-page .container.content-wrapper,
body.pm-block-library-preview-page #primary {
  padding-right: 0;
  padding-left: 0;
}

.pm-block-library-preview .pm-block-library-preview-band {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: 0;
  transform: translateX(-50%);
}

@media (max-width: 480px) {
  .wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link,
  .wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link {
    min-height: 52px;
    padding: 12px 66px 12px 24px;
    background-position: right 7px center;
    background-size: 38px 38px;
    font-size: 16px;
  }

  .wp-block-separator.is-style-pm-grey-teeth-top,
  .wp-block-separator.is-style-pm-grey-teeth-bottom {
    height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-button.is-style-pm-yellow-pokeball > .wp-block-button__link,
  .wp-block-button.is-style-pm-blue-pokeball > .wp-block-button__link {
    transition: none;
  }
}

