@import url("non.geist");
@import url("non.geist/mono");

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

@layer base {
  :root {
    --header-height: 52px;

    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;

    --header-height: 50px;
    --filters-height: 38px;
    --controls-width: 240px;
    --sidebar-width: 240px;
    --base-shadow-color: rgb(0 0 0 / 0.16);

    --base-shadow-color: rgb(0 0 0 / 0.05);

    --button-drop-shadow: rgb(0 0 0 / 0);
    --button-shadow: inset 0px 1px 0px 0px rgb(255 255 255 / 1),
      0px 0px 0px 1px rgb(0 0 0 / 0.06), 0px 1px 0px 0px rgb(0 0 0 / 0.08),
      0px 2px 2px 0px rgb(0 0 0 / 0.04), 0px 3px 3px 0px rgb(0 0 0 / 0.02),
      0px 4px 4px 0px rgb(0 0 0 / 0.01);
    --popover-shadow: 0px 0px 3.6px rgba(0, 0, 0, 0.04),
      0px 0px 10px rgba(0, 0, 0, 0.04), 0px 0px 24.1px rgba(0, 0, 0, 0.05),
      0px 0px 80px rgba(0, 0, 0, 0.08);
    --dropdown-item-shadow: inset 0px 1px 0px rgb(255 255 255 / 0.02),
      inset 0px 0px 0px 1px rgb(255 255 255 / 0.02),
      0px 1px 2px rgb(0 0 0 / 0.12), 0px 2px 4px rgb(0 0 0 / 0.08),
      0px 0px 0px 0.5px rgb(0 0 0 / 0.24);
    --button-base-shadow: 0px 1px 1px -1px rgb(0 0 0 / 0.08),
      0px 2px 2px -1px rgb(0 0 0 / 0.08), 0px 0px 0px 1px rgb(0 0 0 / 0.06),
      inset 0px 1px 0px #fff, inset 0px 1px 2px 1px #fff,
      inset 0px 1px 2px rgb(0 0 0 / 0.06);
  }

  .dark {
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;

    --button-drop-shadow: rgb(0 0 0 / 0.4);
    --danger-drop-shadow: rgb(127 29 29 / 0.8);
    --button-shadow: 0px -1px 0px 0px rgb(255 255 255 / 0.04),
      0px 0px 0px 1px rgb(255 255 255 / 0.12), 0px 0px 1px 0px rgb(0 0 0 / 0.04),
      0px 2px 2px 0px rgb(0 0 0 / 0.04), 0px 4px 2px 0px rgb(0 0 0 / 0.04),
      0px 6px 3px 0px rgb(0 0 0 / 0.04);
    --popover-shadow: 0px 0px 4px rgba(0, 0, 0, 0.08),
      0px 0px 10px rgba(0, 0, 0, 0.12), 0px 0px 24px rgba(0, 0, 0, 0.16),
      0px 0px 80px rgba(0, 0, 0, 0.2);
    --button-base-shadow: 0px 0px 0px 0.5px rgb(0 0 0 / 0.4),
      0px 1px 1px -1px rgb(0 0 0 / 0.12), 0px 2px 2px -1px rgb(0 0 0 / 0.12),
      inset 0px 0.5px 0px rgb(255 255 255 / 0.06),
      inset 0px 0px 1px 0px rgb(255 255 255 / 0.16),
      inset 0px -6px 12px -4px rgb(0 0 0 / 0.16);
    --button-primary-shadow: 0px 1px 1px -1px rgb(0 0 0 / 0.08),
      0px 2px 2px -1px rgb(0 0 0 / 0.08), 0px 0px 0px 1px rgb(0 0 0 / 0.06),
      inset 0px 1px 0px #fff, inset 0px 0px 2px 1px #fff,
      inset 0px 1px 2px rgb(0 0 0 / 0.06),
      inset 0px -4px 8px -4px rgb(0 0 0 / 0.06);
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    font-feature-settings: "rlig" 1, "calt" 1;
    font-synthesis-weight: none;
    text-rendering: optimizeLegibility;
  }
}

p.is-editor-empty:first-child:before {
  color: var(--muted-foreground);
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

@keyframes loading {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
.loading-dot {
  animation: loading 1.4s ease-in-out infinite;
  opacity: 0;
}
.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.tiptap.ProseMirror-focused div[data-video-embed],
.tiptap.ProseMirror-selectedNode div[data-video-embed] {
  @apply ring-2 ring-primary cursor-move p-2 rounded-lg;
}

.hexagon-loader-container {
  @apply relative w-full py-4;
}

.hexagon-loader {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 40px;
}

/* Three hexagon loading animation */
.hexagon {
  display: inline-block;
  position: relative;
  width: 18px;
  height: 10px;
  background-color: #5fe4d3;
  position: relative;
  animation: hexloader 1.4s infinite ease-in-out;
}

.hexagon:before,
.hexagon:after {
  content: "";
  position: absolute;
  width: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}

.hexagon:before {
  bottom: 100%;
  border-bottom: 5px solid #5fe4d3;
}

.hexagon:after {
  top: 100%;
  border-top: 5px solid #5fe4d3;
}

.hexagon + .hexagon {
  margin-left: 8px;
  animation: hexloader 1.4s 0.2s infinite ease-in-out;
  background-color: #4faade;
}

.hexagon + .hexagon:before {
  border-bottom-color: #4faade;
}

.hexagon + .hexagon:after {
  border-top-color: #4faade;
}

.hexagon + .hexagon + .hexagon {
  margin-left: 8px;
  animation: hexloader 1.4s 0.4s infinite ease-in-out;
  background-color: #6041d0;
}

.hexagon + .hexagon + .hexagon:before {
  border-bottom-color: #6041d0;
}

.hexagon + .hexagon + .hexagon:after {
  border-top-color: #6041d0;
}

@keyframes hexloader {
  0%,
  80%,
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
