/* Custom styles for Vidura - Tailwind CSS compatible */

/* Landing page specific styles */
.landing-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 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='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.btn-primary-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 14px 32px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  color: white;
}

.btn-outline-modern {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: white;
  padding: 14px 32px;
  font-weight: 600;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.btn-outline-modern:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
  transform: translateY(-2px);
}

.feature-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.ai-section {
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  position: relative;
  overflow: hidden;
}
.ai-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.ai-feature-card {
  background: white;
  border: 2px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
  position: relative;
}
.ai-feature-card:hover {
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.coming-soon-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Date cards container */
.date-cards-container {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Smooth transitions for theme changes */
* {
  transition-property: background-color, border-color, color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Custom scrollbar for dark mode */
.dark ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

/* Markdown content styles */
.markdown-content {
  color: inherit;
  line-height: 1.75;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.25;
  color: inherit;
}

.markdown-content h1 {
  font-size: 2em;
  border-bottom: 1px solid;
  border-color: rgba(0, 0, 0, 0.1);
  padding-bottom: 0.5em;
}

.dark .markdown-content h1 {
  border-color: rgba(255, 255, 255, 0.1);
}

.markdown-content h2 {
  font-size: 1.5em;
  border-bottom: 1px solid;
  border-color: rgba(0, 0, 0, 0.1);
  padding-bottom: 0.5em;
}

.dark .markdown-content h2 {
  border-color: rgba(255, 255, 255, 0.1);
}

.markdown-content h3 {
  font-size: 1.25em;
}

.markdown-content h4 {
  font-size: 1.125em;
}

.markdown-content h5 {
  font-size: 1em;
}

.markdown-content h6 {
  font-size: 0.875em;
  color: #6b7280;
}

.dark .markdown-content h6 {
  color: #9ca3af;
}

.markdown-content p {
  margin-top: 1em;
  margin-bottom: 1em;
}

.markdown-content p:first-child {
  margin-top: 0;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
  margin-top: 1em;
  margin-bottom: 1em;
  padding-left: 2em;
}

.markdown-content li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.markdown-content ul {
  list-style-type: disc;
}

.markdown-content ol {
  list-style-type: decimal;
}

.markdown-content li > ul,
.markdown-content li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.markdown-content blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 4px solid #3b82f6;
  color: #6b7280;
  font-style: italic;
}

.dark .markdown-content blockquote {
  border-left-color: #60a5fa;
  color: #9ca3af;
}

.markdown-content code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.125em 0.375em;
  border-radius: 0.25em;
  font-size: 0.875em;
  font-family: 'Courier New', Courier, monospace;
  color: #e11d48;
}

.dark .markdown-content code {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f87171;
}

.markdown-content pre {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 1em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin: 1em 0;
  line-height: 1.5;
}

.dark .markdown-content pre {
  background-color: rgba(255, 255, 255, 0.05);
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875em;
}

.markdown-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dark .markdown-content a {
  color: #60a5fa;
}

.markdown-content a:hover {
  color: #1d4ed8;
}

.dark .markdown-content a:hover {
  color: #93c5fd;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border-radius: 0.5em;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5em 0.75em;
  text-align: left;
}

.dark .markdown-content th,
.dark .markdown-content td {
  border-color: rgba(255, 255, 255, 0.1);
}

.markdown-content th {
  background-color: rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.dark .markdown-content th {
  background-color: rgba(255, 255, 255, 0.05);
}

.markdown-content hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 2em 0;
}

.dark .markdown-content hr {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.markdown-content strong {
  font-weight: 700;
}

.markdown-content em {
  font-style: italic;
}

/* Tooltip styles - Modern and polished design */
.tippy-box[data-theme~='custom-tooltip'] {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  max-width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tippy-box[data-theme~='custom-tooltip'] .tippy-content {
  padding: 0.625rem 0.875rem;
  position: relative;
}

.tippy-box[data-theme~='custom-tooltip-dark'] {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-width: 280px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tippy-box[data-theme~='custom-tooltip-dark'] .tippy-content {
  padding: 0.625rem 0.875rem;
  position: relative;
}

/* Arrow styling */
.tippy-arrow[data-theme~='custom-tooltip'] {
  color: #1f2937;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.tippy-arrow[data-theme~='custom-tooltip-dark'] {
  color: #f9fafb;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Animation enhancements */
.tippy-box[data-theme~='custom-tooltip'][data-state='hidden'] {
  opacity: 0;
  transform: scale(0.9) translateY(-4px);
}

.tippy-box[data-theme~='custom-tooltip'][data-state='visible'] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.tippy-box[data-theme~='custom-tooltip-dark'][data-state='hidden'] {
  opacity: 0;
  transform: scale(0.9) translateY(-4px);
}

.tippy-box[data-theme~='custom-tooltip-dark'][data-state='visible'] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Scale animation keyframes for Tippy.js */
@keyframes tippy-scale-enter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes tippy-scale-exit {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(-4px);
  }
}

.tippy-box[data-animation='scale'][data-state='hidden'] {
  animation: tippy-scale-exit 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tippy-box[data-animation='scale'][data-state='visible'] {
  animation: tippy-scale-enter 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Mobile Responsive Styles */
@media (max-width: 640px) {
  /* Mobile menu side drawer styles */
  #mobileMenu {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }
  
  #mobileMenuOverlay {
    backdrop-filter: blur(2px);
  }
  
  /* Prevent text overflow on dashboard */
  .draggable-task,
  .draggable-section {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Ensure task names don't overflow */
  .draggable-task a,
  .draggable-task .truncate {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Smaller text for badges and labels on mobile */
  .draggable-task span,
  .draggable-task select {
    font-size: 0.625rem !important; /* 10px */
  }
  
  /* Ensure modals are full width on mobile */
  .modal-backdrop > div > div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.5rem !important;
  }
  
  /* Reduce modal padding and spacing on mobile */
  #newTaskModal .bg-white,
  #newTaskModal .bg-gray-800 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  /* Smaller textarea height on mobile */
  #newTaskModal textarea {
    min-height: 150px !important;
  }
  
  #newTaskModal .markdown-content {
    font-size: 0.75rem !important;
  }

  /* Make tables horizontally scrollable on mobile */
  .overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure buttons don't overflow */
  button, a[class*="btn"], .btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Better spacing for mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Stack grid columns on mobile */
  .grid-responsive {
    grid-template-columns: 1fr !important;
  }

  /* Make text more readable on mobile */
  h1 {
    font-size: 1.875rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  /* Ensure images are responsive */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Better form inputs on mobile */
  input, textarea, select {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
}

/* Tablet and below */
@media (max-width: 1024px) {
  /* Stack sidebars on tablet */
  .sidebar-responsive {
    width: 100% !important;
    margin-bottom: 1rem;
  }
}
