@import "tailwindcss";

:root {
  /* Indian Government Colors */
  --saffron: #ff9933;
  --white: #ffffff;
  --green: #138808;
  --navy: #000080;
  --ashoka-blue: #6b46c1;

  /* Additional theme colors */
  --temple-gold: #fbbf24;
  --indian-red: #dc2626;
  --lotus-white: #fafafa;
  --heritage-brown: #92400e;

  /* UI Colors */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96%;
  --accent-foreground: 222.2 84% 4.9%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;
  --radius: 0.5rem;
  --chart-1: 12 76% 61%;
  --chart-2: 173 58% 39%;
  --chart-3: 197 37% 24%;
  --chart-4: 43 74% 66%;
  --chart-5: 27 87% 67%;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 217.2 91.2% 59.8%;
  --primary-foreground: 222.2 84% 4.9%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 224.3 76.3% 94.1%;
  --chart-1: 220 70% 50%;
  --chart-2: 160 60% 45%;
  --chart-3: 30 80% 55%;
  --chart-4: 280 65% 60%;
  --chart-5: 340 75% 55%;
}

* {
  border-color: hsl(var(--border));
}

body {
  color: hsl(var(--foreground));
  background: linear-gradient(135deg, var(--lotus-white) 0%, #f0f9ff 100%);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Indian Government Design System */
.tricolor-gradient {
  background: linear-gradient(
    to right,
    var(--saffron),
    var(--white),
    var(--green)
  );
}

.indian-blue-gradient {
  background: linear-gradient(135deg, var(--navy), var(--ashoka-blue));
}

.temple-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f59e0b' fill-opacity='0.1'%3E%3Cpath d='M30 30l15-15v30L30 30zM15 15l15 15-15 15V15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Indian flag colors for accents */
.text-saffron {
  color: var(--saffron);
}

.text-indian-green {
  color: var(--green);
}

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

.text-temple-gold {
  color: var(--temple-gold);
}

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

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

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

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

/* Border utilities */
.border-saffron {
  border-color: var(--saffron);
}

.border-indian-green {
  border-color: var(--green);
}

.border-navy {
  border-color: var(--navy);
}

/* Hero section styling */
.hero-bg {
  background: linear-gradient(
    135deg,
    rgba(107, 70, 193, 0.9) 0%,
    rgba(29, 78, 216, 0.8) 50%,
    rgba(59, 130, 246, 0.7) 100%
  );
}

/* Service card styling */
.service-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--saffron);
}

/* Indian pattern decorations */
.indian-pattern {
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(255, 153, 51, 0.15) 1px,
    transparent 0
  );
  background-size: 20px 20px;
}

/* Ashoka wheel styling */
.ashoka-wheel {
  background: conic-gradient(
    from 0deg,
    var(--navy),
    var(--ashoka-blue),
    var(--navy)
  );
  border-radius: 50%;
  position: relative;
}

.ashoka-wheel::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Responsive design improvements */
@media (max-width: 768px) {
  .hero-bg {
    padding: 2rem 1rem;
  }

  .service-card {
    margin-bottom: 1rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .animate-fadeInUp,
  .animate-float {
    animation: none;
  }
}

/* Print styles for forms */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}

/* TipTap Editor Prose Styles */
.prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.prose ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.prose ul li,
.prose ol li {
  margin: 0.25rem 0;
}

.prose ul ul {
  list-style-type: circle;
}

.prose ul ul ul {
  list-style-type: square;
}

.prose blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #6b7280;
  font-style: italic;
}

.prose h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.75rem 0 0.5rem;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}

.prose p {
  margin: 0.5rem 0;
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/* TipTap Table Styles */
.ProseMirror table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.ProseMirror td,
.ProseMirror th {
  min-width: 1em;
  border: 2px solid #ced4da;
  padding: 3px 5px;
  vertical-align: top;
  box-sizing: border-box;
  position: relative;
}

.ProseMirror th {
  font-weight: bold;
  text-align: left;
  background-color: #f1f3f5;
}

.ProseMirror .selectedCell:after {
  z-index: 2;
  position: absolute;
  content: "";
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(200, 200, 255, 0.4);
  pointer-events: none;
}

.ProseMirror .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: -2px;
  width: 4px;
  background-color: #adf;
  pointer-events: none;
}

.tableWrapper {
  overflow-x: auto;
}

.resize-cursor {
  cursor: ew-resize;
  cursor: col-resize;
}
