@tailwind base;
@tailwind components;
@tailwind utilities;

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@layer utilities {
  .animate-slide-down {
    animation: slideDown 0.3s ease-in-out;
  }

  /* Hide scrollbar while keeping scroll functionality */
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
}

html {
  scroll-behavior: smooth;
}

/* disable smooth scroll in timelines with slider */
html.no-smooth-scroll {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: scroll;
}

.px-site {
  @apply px-4 sm:px-12 lg:px-20 2xl:px-36;
}

.px-site-list {
  @apply px-0 sm:px-12 lg:px-20 2xl:px-36;
}

.p-left-site-list-slider {
  @apply pl-0 sm:pl-12 lg:pl-20 2xl:pl-36;
}

.p-right-site-list-slider {
  @apply pr-0 sm:pr-12 lg:pr-20 2xl:pr-36;
}

.px-site-list-inner {
  @apply px-4 sm:pl-0 sm:pr-4;
}

.py-site {
  @apply py-4 lg:py-24 2xl:py-36;
}

.py-page {
  @apply py-4 sm:py-8;
}

.pt-page {
  @apply pt-4;
}

.pb-page {
  @apply pb-4 sm:pb-8;
}

.bg-white-glass {
  @apply bg-white/90 backdrop-blur-sm;
}

.bg-image-load {
  @apply bg-black/10;
}

.creator-component-size {
  @apply w-full aspect-square sm:aspect-[16/9] xl:aspect-[16/6];
}

.content-text h1,
.content-text h2,
.content-text h3,
.content-text h4,
.content-text h5,
.content-text h6,
.content-text ul {
  @apply my-6 first:mt-0 last:mb-0;
}

.content-text p {
  @apply mb-3 first:mt-0 last:mb-0;
}

.content-text a {
  @apply font-bold underline underline-offset-2 text-mma-blue hover:text-mma-yellow transition-colors;
}

.content-text table {
  /* table-layout: fixed; */
  /* word-break: break-all ; */
  @apply my-6 w-full;
}

.content-text table td,
th {
  @apply border border-neutral-200 p-2 sm:p-6 text-xs sm:text-base;
}

.content-text td {
  /* display: -webkit-box;
  word-break: break-word; */
}

.content-text ol {
  @apply list-decimal list-inside;
}

.content-text ul {
  @apply list-disc list-inside;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track-piece {
  background-color: #eeeeee;
}

::-webkit-scrollbar-thumb {
  background-color: #a0a0a0;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #787878;
}

.react-horizontal-scrolling-menu--scroll-container::-webkit-scrollbar {
  display: none;
}

.react-horizontal-scrolling-menu--scroll-container {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Hide scrollbars but keep scrollable behavior */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.youtube-play-button {
  background: #ff0033;
  border-radius: 50% / 10%;
  color: white;
  font-size: 12px; /* change only this to change size */
  height: 3em;
  padding: 0;
  position: absolute;
  text-align: center;
  text-indent: 0.1em;
  transition: all 150ms ease-out;
  width: 4em;
  top: 50%;
  left: 50%;

  @apply -translate-x-1/2 -translate-y-1/2;
}

.youtube-play-button::before {
  background: inherit;
  border-radius: 5% / 50%;
  bottom: 9%;
  content: "";
  left: -5%;
  position: absolute;
  right: -5%;
  top: 9%;
}

.youtube-play-button::after {
  border-style: solid;
  border-width: 1em 0 1em 1.732em;
  border-color: transparent transparent transparent white;
  content: " ";
  font-size: 0.75em;
  height: 0;
  margin: -1em 0 0 -0.75em;
  top: 50%;
  position: absolute;
  width: 0;
}

.yt-lite:hover > .youtube-play-button {
  @apply bg-[#9b0714];
}

.clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  max-height: 128px;
  line-break: after-white-space;
  text-overflow: ellipsis;

  * {
    display: inline;
  }
}

.clamped > p {
  margin-bottom: 0;
}

/* yet-another-react-lightbox: enlarge desktop navigation arrows */
@media (min-width: 1280px) {
  .yarl__navigation_next {
    padding-right: 0 !important;
  }

  .yarl__navigation_prev {
    padding-left: 0 !important;
  }

  .yarl__navigation_next .yarl__icon,
  .yarl__navigation_prev .yarl__icon {
    /* make arrow glyph bigger */
    width: 72px;
    height: 72px;
  }
}

.yarl__thumbnails_thumbnail_active {
  border: 4px solid #dfcf6f !important;
}
