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

@layer base {
  :root {
    --custom-bg: rgb(236, 244, 252);
    --custom-bg-secondary: rgb(226, 234, 242);
    --custom-dark: rgb(14, 26, 75);
    --custom-orange: rgb(248, 127, 82);
    --custom-orange-dark: rgb(232, 90, 42);
    --custom-text: rgb(26, 26, 26);
    --custom-text-muted: rgb(13, 70, 175);
    --grid-color: rgb(229, 231, 235);
    --grid-pattern: linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
                   linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    --grid-size: 24px 24px;
  }
}

@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 */
    }
  }

@layer components {
  .btn-primary {
    @apply px-6 py-2.5 text-white text-lg font-medium rounded-xl shadow-sm transition-all duration-200;
    background-color: var(--custom-orange);
  }
  .btn-primary:hover {
    background-color: var(--custom-orange-dark);
  }

  .input-primary {
    @apply w-full rounded-xl bg-white shadow-sm transition-all duration-200;
    border: 1px solid rgba(26, 26, 26, 0.2);
    color: var(--custom-text);
  }
  .input-primary:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--custom-orange);
  }

  .label-primary {
    @apply block text-sm font-medium mb-2;
    color: rgba(26, 26, 26, 0.6);
  }

  .bg-custom-bg {
    background-color: var(--custom-bg);
  }

  .bg-custom-bg-secondary {
    background-color: var(--custom-bg-secondary);
  }

  .bg-custom-dark {
    background-color: var(--custom-dark);
  }

  .bg-custom-orange {
    background-color: var(--custom-orange);
  }

  .text-custom-dark {
    color: var(--custom-dark);
  }

  .text-custom-text {
    color: var(--custom-text);
  }

  .text-custom-text-muted {
    color: var(--custom-text-muted);
  }

  .border-custom-dark {
    border-color: var(--custom-dark);
  }

  .ring-custom-orange {
    --tw-ring-color: var(--custom-orange);
  }

  .bg-grid-pattern {
    background-image: var(--grid-pattern);
    background-size: var(--grid-size);
  }
}

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/

@keyframes fadeOutOpacity {
  0% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.animate-fade-out {
  animation: fadeOutOpacity 8s ease-in-out 1 forwards;
}

.animate-fade-out:hover {
  animation: none;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}
/* Dark Theme Report Styles */

:root {
  --gradient-border: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.3));
  --card-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --card-glow-hover: 0 0 30px rgba(59, 130, 246, 0.25);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Glassmorphism cards */
.glass-card {
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(75, 85, 99, 0.3);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-glow-hover);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Fix ROI card shadow rendering - contain shadow and reduce backdrop artifacts */
.grid[style*="z-index: 1"] .glass-card {
  isolation: isolate;
  contain: layout style paint;
}

.grid[style*="z-index: 1"] .glass-card:hover {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Gradient borders */
.gradient-border {
  position: relative;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid transparent;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Number counter monospace */
.counter-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

/* Chart container styling */
.chart-container {
  position: relative;
  background: rgba(31, 41, 55, 0.5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
  }
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal-fade-up {
  transform: translateY(30px);
}

.reveal-fade-up.active {
  transform: translateY(0);
}

.reveal-scale {
  transform: scale(0.95);
}

.reveal-scale.active {
  transform: scale(1);
}

/* Stagger animations for children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Metric card glow effect */
.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 250%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover::after {
  opacity: 1;
}

/* Chart.js dark theme overrides */
canvas {
  filter: brightness(1.1);
}

/* Logo glow effect */
.logo-glow {
  filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}

/* Pulse animation for highlights */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth section transitions */
section {
  transition: all 0.3s ease;
}

/* Details/Summary styling for dark theme */
details summary {
  transition: all 0.3s ease;
}

details[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

details summary:hover {
  background: rgba(55, 65, 81, 0.5);
}

/* Number highlight effect */
.number-highlight {
  position: relative;
  display: inline-block;
}

.number-highlight::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.3));
  z-index: -1;
  border-radius: 4px;
}

/* Typography enhancements */
h1, h2, h3, h4 {
  letter-spacing: -0.025em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .glass-card:hover {
    transform: none;
  }

  .stagger-children > * {
    transform: none;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Client logo animation */
.client-logo {
  transition: transform 0.5s ease;
}

.client-logo:hover {
  transform: rotate(10deg) scale(1.1);
}

.client-logo-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}

.logo-slider {
  display: flex;
  animation: scroll 25s linear infinite;
  width: max-content;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@keyframes logoSpin {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}
