@import "tailwindcss";

/* Attio-inspired Design System with Light Green Theme */
:root {
  --attio-primary: #10b981;
  --attio-primary-hover: #059669;
  --attio-secondary: #f8fafc;
  --attio-border: #e2e8f0;
  --attio-text-primary: #1e293b;
  --attio-text-secondary: #64748b;
  --attio-text-muted: #94a3b8;
  --attio-bg-card: #ffffff;
  --attio-bg-page: #f8fafc;
  --attio-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --attio-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --attio-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Custom utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Attio-style components */
.attio-card {
  @apply bg-white rounded-xl border border-gray-100 shadow-sm hover:shadow-md transition-all duration-200;
}

.attio-card-hover {
  @apply hover:shadow-lg hover:border-gray-200 transition-all duration-200;
}

.attio-button-primary {
  @apply w-full sm:w-auto bg-emerald-600 hover:bg-emerald-700 text-white font-medium py-2.5 px-4 rounded-lg transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-offset-2;
}

.attio-button-secondary {
  @apply w-full sm:w-auto bg-white hover:bg-gray-50 text-gray-700 font-medium py-2.5 px-4 rounded-lg border border-gray-200 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2;
}

.attio-input {
  @apply block w-full rounded-lg border-gray-200 shadow-sm focus:border-emerald-500 focus:ring-emerald-500 transition-colors duration-200;
}

.attio-nav-item {
  @apply flex items-center px-3 py-2.5 text-sm font-medium text-gray-600 rounded-lg hover:bg-gray-50 hover:text-gray-900 transition-all duration-200;
}

.attio-nav-item-active {
  @apply bg-emerald-50 text-emerald-700 border-r-2 border-emerald-600;
}

.attio-badge {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.attio-badge-success {
  @apply bg-green-100 text-green-800;
}

.attio-badge-warning {
  @apply bg-yellow-100 text-yellow-800;
}

.attio-badge-error {
  @apply bg-red-100 text-red-800;
}

.attio-badge-info {
  @apply bg-emerald-100 text-emerald-800;
}

/* Mobile menu transition */
.mobile-menu-enter {
  transform: translateX(-100%);
}

.mobile-menu-enter-active {
  transform: translateX(0);
  transition: transform 300ms ease-in-out;
}

.mobile-menu-exit {
  transform: translateX(0);
}

.mobile-menu-exit-active {
  transform: translateX(-100%);
  transition: transform 300ms ease-in-out;
}

/* Responsive table styles */
@media (max-width: 640px) {
  .responsive-table {
    @apply block w-full overflow-x-auto whitespace-nowrap;
  }
  
  .responsive-table table {
    @apply min-w-full;
  }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .attio-card {
    @apply mx-0;
  }
  
  .attio-nav-item {
    @apply py-3;
  }
  
  .attio-badge {
    @apply text-[10px] px-2;
  }
}

/* AI Chat animations */
@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.animate-bounce {
  animation: bounce 1.4s infinite ease-in-out both;
}

/* Custom Chat Interface Styles */
.chat-message {
  @apply transition-all duration-200 ease-in-out;
}

.chat-message:hover {
  @apply transform scale-[1.001];
}

/* Custom Scrollbar for Chat Messages */
#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Smooth scroll behavior */
#chat-messages {
  scroll-behavior: smooth;
}

/* Loading animation improvements */
@keyframes typing {
  0%, 60% {
    opacity: 1;
  }
  30% {
    opacity: 0.5;
  }
}

.typing-indicator {
  animation: typing 1.5s infinite;
}

/* Copy button hover effect */
.copy-button {
  @apply transition-all duration-200 ease-in-out;
}

.copy-button:hover {
  @apply transform scale-105;
}

/* Modal backdrop blur */
.modal-backdrop {
  backdrop-filter: blur(4px);
}

/* Improved focus styles */
.focus-visible {
  @apply outline-2 outline-offset-2 outline-blue-500;
}

/* Message bubble improvements */
.message-bubble {
  @apply shadow-sm;
  position: relative;
}

.message-bubble::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
}

/* .message-bubble-user::before {
  top: 8px;
  right: -8px;
  border-left: 8px solid rgb(37, 99, 235);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
} */

.message-bubble-assistant::before {
  top: 8px;
  left: -8px;
  border-right: 8px solid rgb(249, 250, 251);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .chat-container {
    padding: 1rem;
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .chat-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Keyboard shortcut styling */
kbd {
  @apply inline-flex items-center justify-center px-2 py-1 bg-gray-100 border border-gray-300 rounded text-xs font-medium text-gray-700 shadow-sm;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, "Cascadia Mono", "Roboto Mono", "Courier New", monospace;
}

/* Toast notification styling */
.toast {
  @apply transform transition-transform duration-300 ease-in-out;
  animation: slideInRight 0.3s ease-out;
}

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

/* Improved button styles */
.btn-primary {
  @apply bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
}

.btn-secondary {
  @apply bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium py-2 px-4 rounded-lg transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2;
}

/* Prose styling improvements for chat messages */
.prose-chat {
}

.prose-chat p {
  @apply mb-2 last:mb-0;
}

.prose-chat ul, .prose-chat ol {
  @apply mb-2;
}

.prose-chat li {
  @apply mb-1;
}

.prose-chat code {
  @apply bg-gray-100 px-1 py-0.5 rounded text-sm font-mono;
}

.prose-chat pre {
  @apply bg-gray-100 p-3 rounded-lg overflow-x-auto;
}

.prose-chat blockquote {
  @apply border-l-4 border-blue-500 pl-4 italic;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    @apply bg-gray-900 text-white;
  }
  
  .dark-mode .message-bubble-assistant {
    @apply bg-gray-800;
  }
  
  .dark-mode .message-bubble-assistant::before {
    border-right-color: rgb(31, 41, 55);
  }
}

.step-log {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-shadow {
  box-shadow: none !important;
}


