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

:root {
  --primary-black: rgb(17, 17, 17);
  --secondary-black: rgb(56, 56, 56);
  --primary-white: rgb(248, 248, 248);
  --primary-blue: rgb(49, 131, 253);
  --primary-red: rgb(228, 61, 61);
  --primary-green: rgb(182, 216, 127);
  --vh: 100vh;
}

:root:has(.prevent-scroll) {
  overflow: hidden;
}

body {
  background: #f8f8f8;
  color: #383838;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input,
select {
  /* color: #fff !important;
  -webkit-text-fill-color: #fff !important; */
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

/* background webkit prefixes */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.webkit-half-box-patern-mask {
  -webkit-mask-image: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    #000 70%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    #000 70%,
    transparent 100%
  );
}

/* component classes */
@layer components {
  input[type="date"]::-webkit-calendar-picker-indicator {
    @apply [filter:invert(100%)] dark:[filter:invert(0%)];
  }

  .full {
    min-height: calc(var(--vh, 1vh) * 100);
  }

  .full-h-header {
    min-height: calc((var(--vh, 1vh) * 100) - 64px);
  }

  .custom-scroll-track {
    @apply [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-zinc-100 dark:[&::-webkit-scrollbar-track]:bg-neutral-600 [&::-webkit-scrollbar-thumb]:bg-zinc-300 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 [&::-webkit-scrollbar-thumb]:rounded-sm;
  }

  .center {
    @apply flex items-center justify-center;
  }

  .no-scrollbar::-webkit-scrollbar {
    @apply hidden;
  }

  .show-scrollbar::-webkit-scrollbar {
    @apply block;
  }

  .custom-scroll::-webkit-scrollbar {
    @apply w-2;
  }

  .custom-scroll:hover::-webkit-scrollbar-thumb {
    @apply rounded-sm bg-zinc-300 dark:bg-neutral-500;
  }

  .blue-scroll::-webkit-scrollbar {
    @apply w-2;
  }

  .blue-scroll:hover::-webkit-scrollbar-thumb {
    @apply rounded-sm bg-[--primary-blue];
  }

  [data-tooltip]::after {
    @apply opacity-100 min-w-36 z-20 invisible absolute px-2.5 py-1.5 text-[#ededed] font-light text-xs tracking-wide top-1/2 text-center left-1/4 bg-[#282828];
  }

  [data-tooltip]:hover::after {
    @apply invisible xs:visible;
    content: attr(data-tooltip);
    -webkit-box-shadow: inset 0px 0px 0px 2px #fff;
    -moz-box-shadow: inset 0px 0px 0px 2px #fff;
    box-shadow: inset 0px 0px 0px 2px #fff;
  }

  .mapboxgl-popup-content {
    display: none !important;
  }

  .continue-gray {
    color: rgba(163, 163, 163, 0.7) !important;
  }

  .gradient-border-green::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid transparent;
    background: linear-gradient(
        120deg,
        rgba(219, 255, 240, 0.584),
        #9999992f 100%
      )
      border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
  }

  .gradient-border-black::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid transparent;
    background: linear-gradient(
        45deg,
        rgba(108, 113, 111, 0.584),
        #9999992f 100%
      )
      border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box,
      linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
  }

  .radial-gradient-shinny {
    background: radial-gradient(
        circle at 50% 0%,
        rgba(250, 250, 250, 0.05) 0%,
        transparent 60%
      ),
      rgba(250, 250, 250, 0.2);
  }

  .linear-mask-shinny-light {
    mask-image: linear-gradient(
      -75deg,
      white calc(var(--x) + 20%),
      transparent calc(var(--x) + 30%),
      white calc(var(--x) + 100%)
    );
    -webkit-mask-image: linear-gradient(
      -75deg,
      white calc(var(--x) + 20%),
      transparent calc(var(--x) + 30%),
      white calc(var(--x) + 100%)
    );
  }

  @media (min-width: 1440px) {
    .gradient-border-black::before {
      border-radius: 28px;
    }
  }

  /* fancy text heading */
  .fancy {
    background: -webkit-linear-gradient(
      74deg,
      #4285f4 0%,
      #9b72cb 10%,
      #d96570 20%,
      #d96570 25%,
      #9b72cb 35%,
      #4285f4 45%,
      #9b72cb 50%,
      #d96570 55%,
      #9b72cb 75%,
      #4285f4 100%
    );
    background: linear-gradient(
      74deg,
      #4285f4 0%,
      #9b72cb 10%,
      #d96570 20%,
      #d96570 25%,
      #9b72cb 35%,
      #4285f4 45%,
      #9b72cb 50%,
      #d96570 55%,
      #9b72cb 75%,
      #4285f4 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: rgb(0 0 0 / 20%);
  }

  .bg-pattern {
    background-color: #f1f1f1;
    background-image: radial-gradient(
        circle,
        transparent 1rem,
        rgba(245, 245, 245, 0.5) 1rem
      ),
      linear-gradient(rgb(180, 192, 211) 0.5rem, transparent 0.5rem),
      linear-gradient(90deg, rgb(180, 192, 211) 0.5rem, transparent 0.5rem);
    background-size: 5rem 5rem;
    background-position: 2.75rem 2.75rem, 0 0, 0 0;
  }

  .bg-pattern-dark {
    background-color: #ffffff;
    background-image: radial-gradient(
        circle,
        transparent 1rem,
        rgba(245, 245, 245, 0.5) 1rem
      ),
      linear-gradient(rgb(70, 70, 70) 0.5rem, transparent 0.5rem),
      linear-gradient(90deg, rgb(61, 61, 61) 0.5rem, transparent 0.5rem);
    background-size: 5rem 5rem;
    background-position: 2.75rem 2.75rem, 0 0, 0 0;
  }
}
