/* Fixes for the exported Wix pages, which run without Wix's scripts:
   click-to-load placeholders for third-party embeds (see js/embeds.js), plain
   links that replace the Ko-fi widgets, and layout that Wix's scripts used to
   do. Nothing here loads anything from a third party. */

/* Wix's script sized page backgrounds to the window; the export kept the size
   of the window it was captured in. */
wow-image.bgImage > img {
  width: 100% !important;
  height: 100% !important;
}

:has(> .embed-facade) {
  position: relative;
}

.embed-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 14px/1.3 "DM Sans", system-ui, sans-serif;
}

.embed-facade-note {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
}

.embed-facade-youtube {
  background: #000 center / cover no-repeat;
  color: #fff;
}

.embed-facade-youtube .embed-facade-play {
  position: relative;
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 0, 0, 0.9);
}

.embed-facade-youtube .embed-facade-play::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}

.embed-facade-youtube .embed-facade-note {
  background: rgba(0, 0, 0, 0.7);
}

/* Blog posts: Wix's video player box gets its height from padding, so the
   placeholder and video are placed on the box itself */
[data-hook="video-player"] :has(> .embed-facade) {
  position: static;
}

/* In place of a YouTube video that has been taken down */
:has(> .embed-unavailable) {
  position: relative;
}

.embed-unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #000;
  color: #fff;
  text-align: center;
  font: 14px/1.3 "DM Sans", system-ui, sans-serif;
}

/* Blog post list: the gallery's own play button would cover the placeholder's,
   and the gallery styles any <button> in it as a small round play button */
.gallery-item-video:has(.embed-facade) .play-button {
  display: none;
}

.gallery-item-video .embed-facade {
  display: flex !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  background-color: #000 !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.kofi-floating {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 10px;
  border-radius: 24px;
  background: #fcbf47;
  color: #323842;
  font: 700 16px/1 "DM Sans", system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.25);
}

.kofi-floating img {
  width: 34px;
  height: auto;
}

.kofi-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  background: #29abe0;
  color: #fff;
  font: 700 14px/1 "DM Sans", system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.kofi-button img {
  height: 15px;
  width: auto;
}

/* Wix's audio player (see js/embeds.js): a pause sign while playing */
[data-audio-src][aria-pressed="true"] svg {
  visibility: hidden;
}
[data-audio-src][aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: 14px;
  height: 18px;
  border-left: 5px solid currentColor;
  border-right: 5px solid currentColor;
}
[data-audio-src] {
  position: relative;
  cursor: pointer;
}

/* In place of a MailerLite sign-up form: an email link, styled like the form */
.signup-email {
  box-sizing: border-box;
  max-width: 340px;
  margin: 0 auto;
  padding: 16px 20px;
  background: #f4f57a;
  border-radius: 4px;
  color: #130373;
  font-family: brandon-grot-w01-light, sans-serif;
  text-align: center;
}
.signup-email-title {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
}
.signup-email-button {
  display: block;
  padding: 8px;
  background: #6a5ad6;
  border-radius: 4px;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
}
.signup-email-button:hover {
  background: #5546b8;
}
.signup-email-note {
  margin: 8px 0 0;
  font-size: 14px;
}

/* Shop: order-by-email and Amazon links, in the boxes that held the PayPal
   buttons (see scripts/clean-export.py). */
.shop-buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  font: 600 15px/1.2 "DM Sans", system-ui, sans-serif;
}

.shop-buy a {
  color: rgb(9, 63, 124);
}

.shop-buy .shop-order,
.shop-buy .shop-amazon {
  display: inline-block;
  min-width: 170px;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 2px solid rgb(9, 63, 124);
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
}

.shop-buy .shop-order {
  background: rgb(9, 63, 124);
  color: #fff;
}

.shop-buy .shop-amazon {
  background: #fff;
}

.shop-buy .shop-order:hover,
.shop-buy .shop-amazon:hover {
  text-decoration: underline;
}

.shop-amazon-list {
  color: rgb(9, 63, 124);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.shop-amazon-list a {
  white-space: nowrap;
  text-decoration: underline;
}
