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

/* S-Tier Enhanced File Manager Styles */
@layer components {
  /* Premium scrollbar styling */
  .scrollbar-thin::-webkit-scrollbar {
    width: 8px;
  }
  .scrollbar-thin::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border-radius: 8px;
    margin: 4px;
  }
  .scrollbar-thin::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cbd5e1, #94a3b8);
    border-radius: 8px;
    border: 2px solid #f8fafc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  }
  .scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #94a3b8, #64748b);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  }
  
  /* Enhanced animations */
  .animate-in {
    animation: slideInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  @keyframes slideInScale {
    from {
      opacity: 0;
      transform: translateY(-8px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  /* Subtle backdrop blur effect */
  .backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  
  /* Enhanced focus states */
  .focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
  }
  
  /* Smooth scale transforms */
  .transform-gpu {
    transform: translateZ(0);
    backface-visibility: hidden;
  }
}

/* Copied from app styles/globals.css so consumers automatically get same styles when importing the package */

/* Custom Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  cursor: pointer;
  touch-action: manipulation;
}
/* Track styling */
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
}
/* Thumb styling */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  margin-top: -6px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}
input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.2);
}
input[type="range"]:active::-moz-range-thumb {
  transform: scale(1.2);
}
/* Touch Optimizations omitted for brevity (identical to app) */

/* Hide number input spinners where needed */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-spinner {
  -moz-appearance: textfield;
}

/* Tailwind root vars & base layer for radius etc. */
@layer base {
  :root {
    --radius: 0.5rem;
  }
  body {
    @apply bg-background text-foreground;
  }
} 

/* React Day Picker Styles - v9 */
/* These styles are included to avoid Next.js CSS import issues */
.rdp {
  --rdp-background-color: #ffffff;
  --rdp-accent-color: #4f46e5;
  --rdp-accent-background-color: #e0e7ff;
  --rdp-accent-background-color-dark: #4f46e5;
  --rdp-accent-color-dark: #ffffff;
  --rdp-disabled-color: #9ca3af;
  --rdp-disabled-background-color: #f3f4f6;
  --rdp-outline: 2px solid var(--rdp-accent-color);
  --rdp-outline-selected: 2px solid var(--rdp-accent-color-dark);
}

.rdp-vhidden {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  position: absolute !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.rdp-button_reset {
  appearance: none;
  position: relative;
  margin: 0;
  padding: 0;
  cursor: default;
  color: inherit;
  background: none;
  font: inherit;
  border: 0;
  outline: none;
}

.rdp-button {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  margin: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  background: none;
  font: inherit;
  border: 0;
  outline: none;
}

.rdp-months {
  display: flex;
}

.rdp-month {
  margin: 0 1em;
}

.rdp-month:first-child {
  margin-left: 0;
}

.rdp-month:last-child {
  margin-right: 0;
}

.rdp-table {
  margin: 0;
  max-width: calc(var(--rdp-cell-size) * 7);
  border-collapse: collapse;
}

.rdp-with_weeknumber .rdp-table {
  max-width: calc(var(--rdp-cell-size) * 8);
  border-collapse: collapse;
}

.rdp-tbody {
  border: 0;
}

.rdp-row {
  height: 100%;
}

.rdp-row:nth-child(2) {
  padding-top: 0.25em;
}

.rdp-head_cell {
  vertical-align: middle;
  text-align: center;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
}

.rdp-cell {
  width: var(--rdp-cell-size, 2.5rem);
  height: 100%;
  text-align: center;
  padding: 0;
}

.rdp-day {
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-weight: 500;
  border: 2px solid transparent;
  border-radius: 6px;
}

.rdp-day_today:not(.rdp-day_selected) {
  font-weight: 700;
  color: var(--rdp-accent-color);
}

/* Video.js styling for proper aspect ratio preservation - ensure full height is always visible */
.video-js .vjs-tech,
.video-js video,
.video-js .vjs-poster,
.vjs-tech {
  object-fit: contain !important;
  object-position: center center !important;
  width: 100% !important;
  height: 100% !important;
}

/* Ensure the Video.js player container respects aspect ratio */
.video-js {
  object-fit: contain !important;
}

/* Override any Video.js responsive behaviors that might crop the video */
.video-js.vjs-fluid {
  object-fit: contain !important;
}

/* Ensure the video element itself maintains aspect ratio */
.video-js .vjs-tech video,
.video-js video {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
} 
