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

@layer base {
  :root {
    --background: 224 50% 98%;
    --foreground: 224 71.5% 2%;

    --card: 0 0% 100%;
    --card-foreground: 224 71.4% 4.1%;

    --popover: 0 0% 100%;
    --popover-foreground: 224 71.4% 4.1%;

    --primary: 220.9 39.3% 11%;
    --primary-foreground: 210 20% 98%;

    --secondary: 220 14.3% 95.9%;
    --secondary-foreground: 220.9 39.3% 11%;

    --muted: 220 14.3% 95.9%;
    --muted-foreground: 220 8.9% 46.1%;

    --accent: 220 14.3% 95.9%;
    --accent-foreground: 220.9 39.3% 11%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 20% 98%;

    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 224 71.4% 4.1%;

    --radius: 0.5rem;
  }

  .dark {
    --background: 224 25% 5%;
    --foreground: 210 50% 98%;

    --card: 224 71.4% 4.1%;
    --card-foreground: 210 20% 98%;

    --popover: 224 71.4% 4.1%;
    --popover-foreground: 210 20% 98%;

    --primary: 210 20% 98%;
    --primary-foreground: 220.9 39.3% 11%;

    --secondary: 215 27.9% 16.9%;
    --secondary-foreground: 210 20% 98%;

    --muted: 215 27.9% 16.9%;
    --muted-foreground: 217.9 10.6% 64.9%;

    --accent: 215 27.9% 16.9%;
    --accent-foreground: 210 20% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 20% 98%;

    --border: 215 27.9% 16.9%;
    --input: 215 27.9% 16.9%;
    --ring: 216 12.2% 83.9%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

.vjs-tech {
  border-radius: 0.75rem !important;
}
/* Overall Video Player Styles */
.video-js {
  border-radius: 0.75rem !important;
  font-family: inherit !important;
  max-width: 100%;
  background-color: #000; /* Ensure background color matches video content */
  overflow: hidden !important;
  transform-style: preserve-3d;
}

/* Video element styles */
.video-js .vjs-tech {
  border-radius: 0.75rem !important;
  transform-origin: center !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.2s ease-out;
}

/* Zoomed state styles */
.video-js .vjs-tech.zoomed {
  perspective: 1000;
  -webkit-perspective: 1000;
  touch-action: none;
}

/* Zoom level indicator */
.video-js .vjs-zoom-level {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
  pointer-events: none;
  font-family: inherit !important;
}

.video-js.vjs-fullscreen .vjs-tech {
  object-fit: contain !important;
  background-color: black;
}

.video-js.vjs-fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Control Bar Background */
.vjs-control-bar {
  border-radius: 0 0 0.75rem 0.75rem !important;
  background-color: rgba(
    0,
    0,
    0,
    0.8
  ) !important; /* Dark background for better contrast */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5); /* Subtle shadow for depth */
  align-items: center !important;
  display: flex !important;
}

/* Play/Pause Button */
.vjs-play-control {
  color: #fff !important;
}

/* Volume Control */
.vjs-volume-control .vjs-volume-bar {
  background: #333 !important;
}
.vjs-volume-control .vjs-volume-level {
  background: #336be3 !important;
}

/* Progress Bar */
.vjs-play-progress {
  background: #336be3 !important;
}

/* Custom Quality Selector Dropdown */
.vjs-quality-selector .vjs-custom-dropup-menu {
  bottom: calc(100% + 5px); /* Space between dropdown and control */
  left: 50%;
  transform: translateX(-50%);
  background: #333; /* Dropdown background */
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.vjs-quality-selector .vjs-custom-dropup-menu li {
  padding: 0.5rem 1rem;
}
.vjs-quality-selector .vjs-custom-dropup-menu li:hover {
  border-radius: inherit;
}

/* Custom Tooltip Styling */
.vjs-play-progress .vjs-time-tooltip {
  background: #333 !important;
  color: #fff !important;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
}

/* Responsive Control Bar */
@media (max-width: 550px) {
  .vjs-seek-button,
  .vjs-time-divider {
    display: none !important;
  }
  .vjs-control {
    font-size: 0.75rem !important;
    /* width: 2.5rem !important; */
  }

  /* Hide time divider and duration on very small screens */

  /* Fullscreen Mobile Controls */
  .vjs-fullscreen .vjs-control-bar {
    position: fixed;
    padding: 0.5rem;
    background-color: rgba(
      0,
      0,
      0,
      0.9
    ) !important; /* Darker background for fullscreen */
    z-index: 10;
  }
}

/* Hide Non-essential Controls */
.vjs-picture-in-picture-control,
.vjs-settings-menu {
  display: none !important;
}

/* Custom Styling for Time Tooltip */
.vjs-time-tooltip {
  background: rgba(0, 0, 0, 0.75) !important;
  color: #fff !important;
  border-radius: 0.25rem;
  padding: 0.25rem;
}

.timeline-segments {
  position: relative;
  left: 0;
  height: 5px;
  background-color: #afa4a4;
  transition: height 150ms ease-in-out;
}

.timeline-segments-preview {
  position: absolute;
  left: 0;
  background: #fff;
  top: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

.timeline-segments-progress {
  position: absolute;
  left: 0;
  background: #f84b4b;
  top: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}
.timeline-segments:hover {
  height: 10px;
}

@layer utilities {
  .wrapper {
    @apply h-full w-full max-w-7xl px-4 py-4 md:px-12 lg:px-20 lg:mx-auto xl:max-w-[90rem];
  }

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

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

@layer utilities {
  /* Hide scrollbar for Chrome, Safari and Opera */
  .no-scrollbar::-webkit-scrollbar {
      display: none;
  }
 /* Hide scrollbar for IE, Edge and Firefox */
  .no-scrollbar {
      -ms-overflow-style: none;  /* IE and Edge */
      scrollbar-width: none;  /* Firefox */
}
}

.markdown-editor-default-font {
  font-family: inherit !important;
}

/* notion-custom.css */
.notion {
  font-family: var(--font-satoshi), sans-serif !important;
}

.notion h1,
.notion h2,
.notion h3 {
  font-family: var(--font-satoshi), sans-serif !important;
}

.notion-header {
  display: none !important;
}
.notion-code {
  border-radius: 12px !important;
}
.medium-zoom-image {
  border-radius: 0.5rem !important;
  border: 1px solid #0a0a0a36 !important;
  background-size: cover !important;
  cursor: pointer !important;
}
.notion-page {
  padding: 1rem !important;
  background-color: transparent !important;
}

.notion-renderer.notion {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.notion-renderer .notion-page,
.notion-renderer .notion-text,
.notion-renderer .notion-h1,
.notion-renderer .notion-h2,
.notion-renderer .notion-h3 {
  width: 100% !important;
  max-width: 100% !important;
}

.notion-renderer .notion-asset-wrapper {
  max-width: 100%;
}

.notion-renderer .notion-asset-wrapper img {
  max-width: 100%;
  height: auto;
}

.notion-renderer .notion-code {
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 640px) {
  .notion-renderer .notion-page {
    padding: 0.5rem !important;
  }
}

/* Smooth scrollbar */

/* width */
::-webkit-scrollbar {
  width: 5px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #020817;
  border-radius: 15px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #2a2e3a;
  border-radius: 15px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

::view-transition-group(root) {
  animation-timing-function: var(--expo-out);
}

::view-transition-new(root) {
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><filter id="blur"><feGaussianBlur stdDeviation="2"/></filter></defs><circle cx="0" cy="0" r="18" fill="white" filter="url(%23blur)"/></svg>')
    top left / 0 no-repeat;
  mask-origin: content-box;
  animation: scale 1s;
  transform-origin: top left;
}

::view-transition-old(root),
.dark::view-transition-old(root) {
  animation: scale 1s;
  transform-origin: top left;
  z-index: -1;
}

@keyframes scale {
  to {
    mask-size: 350vmax;
  }
}

.vjs-text-track-cue {
  display: none !important;
}