/*
Theme Name: TOORA
Theme URI: https://toora.org.au/
Author: the New Best Friend
Author URI: https://newbestfriend.com.au
Requires at least: 6.7.2
Tested up to: 6.7.2
Requires PHP: 8.0
Version: 1.0
Text Domain: toora-blocks
*/

footer {
  margin-top: 0 !important;
}

html {
  scroll-behavior: smooth;
}

main.wp-block-group {
  margin-top: 0 !important;
}

img {
  display: block;
}

input::placeholder {
  opacity: 0.5;
}

.hide-on-mobile {
  @media (max-width: 781px) {
    & {
      display: none !important;
    }
  }
}
.hide-on-tablet {
  @media (min-width: 782px) and (max-width: 1009px) {
    & {
      display: none !important;
    }
  }
}
.hide-on-desktop {
  @media (min-width: 1010px) {
    & {
      display: none !important;
    }
  }
}
.d-none {
  display: none !important;
}
.d-block {
  display: block !important;
}

/*
 * CHANGE CONTENT ORDER
 */
.order-1 {
  order: 1;
}
.order-2 {
  order: 2;
}
.order-3 {
  order: 3;
}
@media (max-width: 781px) {
  .order-mobile-1 {
    order: 1;
  }
  .order-mobile-2 {
    order: 2;
  }
  .order-mobile-3 {
    order: 3;
  }
}

.w-100 {
  width: 100%;
}

.is-position-sticky {
  top: var(--wp--preset--spacing--30);
}

/*iframe {
  width: 100%;
  max-width: unset !important;
  aspect-ratio: 16 / 9;
  height: auto;  
}*/


/* Fix rotated text for mobile */
@media (max-width: 785px) {
  *.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]) {
    rotate: 0deg !important;
    text-align: left !important;
    writing-mode: initial !important;
  }
}

/* Apply scroll-driven animation */
:is(.fade-in, img) {
  &;:not(.no-fade) {
    view-timeline-name: --img;
    view-timeline-axis: block;
    animation-timeline: --img;
    animation-name: fade-in-up;
    animation-range: entry 20% cover 50%;
    animation-fill-mode: both;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 786px) {
  .wp-block-navigation__container {
    &:has(*:hover) {
      .wp-block-navigation-item {
        opacity: 0.5;
      }
    }  
    > .wp-block-navigation-item {
      transition: 0.3s ease-out;
      a {
        text-decoration: none !important;
      }
      &:hover, &:focus {
        opacity: 1 !important;
        transition: 0.1s ease;
      }
    }

    &:has(.current-menu-item) > .wp-block-navigation-item {
      opacity: 0.5;
      &.current-menu-item {
        opacity: 1;
      }
    }

  }
}


.slots {
  -webkit-mask-image: -webkit-gradient(
    linear, center top, center bottom, 
    color-stop(0.00,  rgba(0,0,0,0)),
    color-stop(0.35,  rgba(0,0,0,1)),
    color-stop(0.50,  rgba(0,0,0,1)),
    color-stop(0.85,  rgba(0,0,0,1)),
    color-stop(1.00,  rgba(0,0,0,0))); 
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
  position: relative;  
  float: left;
}

/* The inner container holds the original set duplicated for seamless looping */
.slots-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  box-sizing: border-box;
  width: fit-content;
  animation-name: scrollAnimation;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  > * {
    margin: 0;  
  }
}

#safeExit {
  width: 100%;
  height: 45px;
  border: 0 !important;
  cursor: pointer;
  border-radius: 0 !important;
  background: var(--wp--preset--color--coral);
  color: var(--wp--preset--color--deep-indigo);
  text-align: center;
  font-weight: 700;
  & .pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--wp--preset--color--alabaster);
  }  
}

.wp-block-cloudcatch-light-modal-block__wrapper.is-open {
    margin: auto !important;
}

.givewp-donation-form-modal__overlay {
  z-index: 999999999;
}

.givewp-donation-form-link, .givewp-donation-form-modal__open {
  background: var(--wp--preset--color--deep-indigo);
  color: var(--wp--preset--color--alabaster);
  font-family: var(--wp--preset--font-family--body);
  margin-inline: auto;
}