/* TODO: Specify this breakpoint based on page breakpoint */
@media (max-width: 750px) {
  .hide-on-mobile {
    display: none !important;
  }
}
@media (min-width: 750px) {
  .hide-on-desktop {
    display: none !important;
  }
}

/* Utility class for hiding/showing things easily */
html body .fc-hide {
  display: none !important;
}

.cta-container:has([data-open-lightbox*="full-story"]):not(.fc-show),
[data-open-lightbox*="full-story"]:not(.fc-show) {
  display: none !important;
}

ol li:has(> [data-open-lightbox*="full-story"]:not(.fc-show)),
ol li:has(> [data-open-lightbox*="full-story"].fc-hide) {
  display: none;
}

/* Padding for lightbox and inlineLFSP */
:is(.fc-lightbox, .inline-lfsp) p,
:is(.fc-lightbox, .inline-lfsp) h1,
:is(.fc-lightbox, .inline-lfsp) h2,
:is(.fc-lightbox, .inline-lfsp) h3,
:is(.fc-lightbox, .inline-lfsp) h4 {
  padding: 0 var(--fc-side-padding);
}
.fc-lightbox h1 {
  margin-top: 1em;
}
:is(.fc-lightbox, .inline-lfsp) ul,
:is(.fc-lightbox, .inline-lfsp) ol {
  padding-left: var(--fc-side-padding);
  padding-right: var(--fc-side-padding);
  color: inherit;
}
.fc-lightbox p,
.fc-lightbox li {
  font-size: var(--fc-font-size);
  color: inherit;
}
:is(.fc-lightbox, .inline-lfsp) li > p {
  padding: 0 !important;
  margin: 0;
}
:is(.fc-lightbox, .inline-lfsp) span {
  font-size: inherit;
}
:is(.fc-lightbox, .inline-lfsp) img {
  max-width: 100%;
}
html,
body {
  --fc-lightbox-width: 750px;
  --fc-lightbox-background: #ffffff;
  --fc-close-button-padding: 10px;
}
@keyframes fcSlideIn {
  0% {
    opacity: 20%;
    margin-top: 30px;
  }
  100% {
    opacity: 1;
    margin-top: 0;
  }
}
@keyframes fcSlideOut {
  0% {
    opacity: 1;
    margin-top: 0;
  }
  100% {
    opacity: 0;
    margin-top: 30px;
  }
}
/* When a lightbox is opened, dont allow scrolling of the page below */
html.fc-lightbox-open.fc-lightbox-open.fc-lightbox-open,
html.fc-lightbox-open.fc-lightbox-open.fc-lightbox-open > body {
  overflow: hidden;
}
/* Hide Chat widgets when lightbox is open */
html.fc-lightbox-open.fc-lightbox-open.fc-lightbox-open #gorgias-chat-container,
html.fc-lightbox-open body > [style*="z-index"] {
  display: none;
}
.fc-lightbox-overlay {
  z-index: 999999999;
  background: rgba(0, 0, 0, 0.8);
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  top: 0;
  overflow: auto;

  padding-bottom: 5px;
  display: flex;
  position: fixed;

  flex-flow: wrap;
  align-items: center;
  justify-content: center;
}
.fc-lightbox {
  color: #000;

  display: block;
  box-sizing: border-box;
  background: #ffffff;
  background: var(--fc-lightbox-background);
  width: calc(100% - 10px);

  overflow-y: auto;
  overflow-x: hidden;

  padding: 0;
  margin: 5px 5px 20px;
  max-width: var(--fc-lightbox-width);
  border-radius: 12px;
  animation-name: fcSlideIn;
  animation-iteration-count: 1;
  animation-timing-function: linear;
  animation-duration: 0.3s;
}
.fc-lightbox.fc-fade-out {
  animation-name: fcSlideOut;
  animation-iteration-count: 1;
  animation-timing-function: linear;
  animation-duration: 0.3s;
}

@media (min-width: 750px) {
  .fc-lightbox__close {
    padding: var(--fc-close-button-padding, 0);
    cursor: pointer;
    z-index: 9999999999999999999;
    border: none;
    line-height: 0;
    background: transparent;
    position: fixed;
    left: calc(50vw + var(--fc-lightbox-width) / 2);
    transform: translateX(-100%);
    border-radius: 0px 12px 0px 0px;
    min-width: unset;
    box-shadow: unset;
    padding: 10px;
  }
  .fc-lightbox__close svg {
    width: 20px;
    fill: var(--fc-accent, red);
    background: var(--fc-lightbox-background);
    padding: 10px;
    border-radius: 4px;
    box-sizing: content-box !important;
  }
}
.fc-lightbox__close {
  background: none !important;
}
/* Desktop */
@media (min-width: 750px) {
  :root {
    --fc-font-size: 20px;
    --fc-side-padding: 40px;
  }
  .fc-lightbox .fc-lightbox__close + * {
    padding-top: 1.5em;
  }
}
/* Mobile */
@media (max-width: 750px) {
  :root {
    --fc-side-padding: 10px;
    --fc-font-size: 18px;
  }
  .fc-lightbox-overlay {
    flex-flow: row;
    align-items: unset;
    padding: 8px 8px 0;
  }
  .fc-lightbox {
    width: 100%;
    margin: 0;
    left: 0;
    border-radius: 4px 4px 0 0;
    padding-top: 45px;
    padding-top: 45px;
    max-height: 100%;
    transform: none;
  }
  .fc-lightbox__close {
    position: relative;
    z-index: 1000000;
    width: calc(100% - 16px);
    font-size: 1.2em;
    border: 0;
    padding: 8px;
    left: 8px;
    top: 8px;
    margin-top: -2px;
    background: #fff !important;
    border-bottom: solid var(--fc-accent, red);
    color: var(--fc-accent, red);
    height: 45px;
    border-radius: 4px 4px 0 0;
    animation-name: fcSlideIn;
    animation-iteration-count: 1;
    animation-timing-function: linear;
    animation-duration: 0.3s;
  }

  .fc-lightbox.fc-fade-out > .fc-lightbox__close {
    animation-name: fcSlideOut;
    animation-iteration-count: 1;
    animation-timing-function: linear;
    animation-duration: 0.3s;
  }
  .fc-lightbox__close svg {
    display: none;
  }
  .fc-lightbox__close::before {
    content: "× Close";
  }
}
.single-column-table {
  margin: 0 var(--fc-side-padding) 1em;
  padding: 1em 0;
}
.single-column-table > p:not([style*="margin-left"]) {
  margin-left: 0 !important;
}
.single-column-table p:first-of-type {
  margin-top: 0;
}
.single-column-table p:last-of-type {
  margin-bottom: 0;
}

.fc-lightbox > *:first-child + :is(h1, h2, p) {
  margin-top: 1em;
}

/* Add space between images and paragraphs */
.fc-lightbox div:has(> img) + p {
  margin-top: 1em;
}

.fc-lightbox p:has([data-open-lightbox]) {
  text-align: center;
}
.fc-lightbox [data-close-lightbox] {
  margin-top: 0;
  margin-bottom: var(--fc-side-padding);
}

html,
body {
  --fc-lightbox-width: 600px;
  --fc-lightbox-background: #ffffff;
  --fc-close-button-padding: 10px;
}

@media (max-width: 750px) {
  .fc-lightbox {
    padding-top: 0 !important;
  }
  .fc-lightbox .fc-lightbox__close {
    /* position: absolute; */
    /* left: 100% !important; */
    /* top: 10px; */
    transform: none !important;
    width: 100% !important;
  }
}
/* Mobile */
@media (max-width: 750px) {
  :root {
    --fc-side-padding: 10px;
    --fc-font-size: 18px;
  }
  .fc-lightbox-overlay {
    flex-flow: row;
    align-items: anchor-center;
    padding: 8px 8px 0;
  }
  .fc-lightbox {
    width: 100%;
    margin: 0;
    left: 0;
    border-radius: 4px 4px 0 0;
    padding-top: 45px;
    padding-top: 45px;
    max-height: 100%;
    transform: none;
  }

  .fc-lightbox.fc-fade-out > .fc-lightbox__close {
    animation-name: fcSlideOut;
    animation-iteration-count: 1;
    animation-timing-function: linear;
    animation-duration: 0.3s;
  }
}

.fc-lightbox .fc-lightbox__close {
  background: none;
  color: #000 !important;
  font-size: 30px;
  font-weight: 300;
}
.fc-lightbox .fc-lightbox__close svg {
  fill: #000;
}
@media (max-width: 750px) {
  .fc-lightbox .fc-lightbox__close {
    transform: translateX(-100%);
    margin-left: -10px;
    border-radius: 0;
    font-size: 16px;
    text-transform: uppercase;
    border-bottom: none;
    box-shadow: 0px 3px 4px 0px #00000040;
  }
  .fc-lightbox .fc-lightbox__close::before {
    content: "CLOSE X";
    font-weight: 500;
  }
}
.fc-lightbox p {
  margin: 26px 0;
  font-size: 18px !important;
}

.fc-link {
  background: transparent !important;
  padding: 0 !important;
  color: rgba(87, 139, 145, 1) !important;
  text-decoration: underline;
  border: 0;
  font-size: inherit !important;
  cursor: pointer;
}
