/* Apply the 'Cairo' font to the entire application */
body {
    font-family: 'Cairo', sans-serif;
}

/*
  THIS IS THE CORRECTED RULE.
  It hides the scrollbar on the main content area during the intro.
*/
body.no-scroll .drawer-content {
    overflow: hidden;
}

/* --- Utility to Hide Scrollbars --- */
.hide-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;  /* Safari and Chrome */
}

/* --- CSS to Hide Default Number Input Arrows --- */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

.placeholder {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Crect width='100%25' height='100%25' fill='%23f0f0f0'/%3E%3Cg fill='none' stroke='%23cccccc' stroke-width='14' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M120 280l80-100 100 80z'/%3E%3Ccircle cx='250' cy='150' r='30'/%3E%3C/g%3E%3C/svg%3E")
              center/cover no-repeat;
}

body.modal-open .drawer-content {
  filter: blur(4px) brightness(0.8);
  transition: filter 0.3s ease-out;
  pointer-events: none;
}

/* =========== STYLES FOR VIDEO OVERLAY =========== */
.video-overlay-hidden {
    opacity: 0;
    pointer-events: none; /* Make it unclickable after hiding */
}
/* =================================================== */


/* =========== LOGO INTRO ANIMATION =========== */

/*
 * Keyframe animation for the logo's container (the <a> tag).
 * Default for Desktop screens.
*/
@keyframes fly-back {
    0%, 80% {
        top: 50%;
        right: 50%;
        /* Starts centered */
        transform: translate(50%, -50%);
        opacity: 1;
    }
    99% {
        top: 0.75rem;
        /* Final position for desktop (top-right) */
        right: 0.5rem;
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        top: 0.75rem;
        right: 0.5rem;
        transform: translateX(0);
        opacity: 0;
    }
}

/*
 * RESPONSIVE ADJUSTMENT FOR MOBILE & TABLET
 * This media query targets screens up to 1023px wide.
 * It redefines the animation to position the logo next to the burger menu.
*/
@media (max-width: 1023px) {
    @keyframes fly-back {
        0%, 80% {
            top: 50%;
            right: 50%;
            transform: translate(50%, -50%);
            opacity: 1;
        }
        99% {
            top: 0.75rem;
            /* Adjust 'right' to make space for the burger menu */
            right: 3.5rem;
            transform: translateX(0);
            opacity: 1;
        }
        100% {
            top: 0.75rem;
            /* Ensure final position is consistent */
            right: 3.5rem;
            transform: translateX(0);
            opacity: 0;
        }
    }
}


/*
 * Keyframe animation for the logo's image (the <img> tag).
 * Stays the same for all screen sizes.
*/
@keyframes shrink {
    0%, 80% {
        height: 28vh;
    }
    100% {
        height: 2.5rem; /* Equivalent to Tailwind's h-10 */
    }
}

/*
 * Keyframe animation for the placeholder.
 * Stays the same for all screen sizes.
*/
@keyframes fade-in {
    0%, 99% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Apply the animations to our custom classes */
.animated-logo {
    /*
     * animation-fill-mode: forwards; is crucial. It makes the element
     * retain the styles from the last keyframe after the animation ends.
    */
    animation: fly-back 5000ms ease-in-out forwards;
}

.animated-logo img {
    animation: shrink 5000ms ease-in-out forwards;
}

.placeholder-logo {
    animation: fade-in 5000ms forwards;
}
/* =================================================== */


/* Tailwind CSS Directives */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
  .hide-scrollbar::-webkit-scrollbar {
      display: none;
  }
  .hide-scrollbar {
      -ms-overflow-style: none;
      scrollbar-width: none;
  }
}