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

@layer utilities {
  .animate-fade-in {
    animation: fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    filter: blur(4px) saturate(0.25);
  }

  to {
    opacity: 1;
    filter: blur(0) saturate(1);
  }
}

:root {
  color-scheme: dark;
}

[data-sonner-toast] [data-close-button] {
  opacity: 0;
  transition: all 0.2s ease-in-out;
}

[data-sonner-toast]:hover [data-close-button],
[data-sonner-toast]:focus [data-close-button],
[data-sonner-toast]:focus-within [data-close-button] {
  opacity: 1;
}

[cmdk-root] {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translate(-50%);
  width: calc(100% - 32px);
  max-width: 680px;
  background-color: #09090b;
  color: #e4e4e7;
  border: 1px solid #3f3f46;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease;
  z-index: 50;
}

[cmdk-overlay] {
  position: fixed;
  inset: 0;
  background-color: #00000050;
  backdrop-filter: brightness(50%);
  -webkit-backdrop-filter: brightness(50%);
  z-index: 40;
}

[cmdk-input] {
  width: 100%;
  font-size: 14px;
  padding: 16px;
  outline: none;
  background: transparent;
  border-bottom: 1px solid #3f3f46;
}

[cmdk-input]::placeholder {
  color: #9f9fa9;
}

[cmdk-input]::selection {
  background-color: #71717a33;
}

[cmdk-list] {
  height: var(--cmdk-list-height) + 8px;
  max-height: 406px;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block-start: 8px;
  scroll-padding-block-end: 8px;
  padding: 8px;
  transition: height 0.2s ease;
}

[cmdk-item] {
  content-visibility: auto;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 54px;
  padding: 8px;
  user-select: none;
  will-change: background, color;
  transition: all 0.2s ease;
}

[cmdk-item][data-selected="true"] {
  background: #3f3f4650;
}

[cmdk-item][data-disabled="true"] {
  background-color: transparent;
  color: #71717a;
  cursor: not-allowed;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre-wrap;
}

[cmdk-item][data-selected="true"]:active {
  transition-property: background;
  background: #3f3f46cc;
}

[cmdk-item][data-disabled="true"]:active {
  background: transparent;
}

[cmdk-item]+[cmdk-item] {
  margin-top: 2px;
}

[cmdk-loading] {
  font-size: 14px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre-wrap;
}

[cmdk-empty] {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  white-space: pre-wrap;
  padding: 16px;
}

[cmdk-footer] {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid #3f3f46;
  color: #71717a;
  font-size: 12px;
  user-select: none;
}

[cmdk-footer] kbd {
  background: #e5e5e510;
  border-radius: 4px;
  height: 20px;
  font-size: 12px;
  padding: 0 4px;
  display: flex;
  min-width: 20px;
  align-items: center;
  justify-content: center;
}