@import "tailwindcss";

@theme {
  --color-primary: #3b82f6;
  --color-secondary: #64748b;
  --color-nice-light-blue: #7ec8e3;
  --color-nice-dark-blue: #000c66;
  --color-really-dark-blue: #050a30;
  --color-primary-light: #7ec8e3;
  --color-primary-dark: #1e3a8a;
  --color-primary-mid: #3b82f6;
  --color-text-dark: #1f2937;
  --color-text-light: #f8fafc;
}

/* Professional enhancements */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Logo enhancements */
.logo-nav {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-nav:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.logo-hero {
  filter: drop-shadow(0 8px 16px rgba(126, 200, 227, 0.3));
  animation: float 6s ease-in-out infinite;
}

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

/* Enhanced button styles */
.btn-primary {
  background: linear-gradient(135deg, #7ec8e3 0%, #5fb3d0 100%);
  box-shadow: 0 4px 15px rgba(126, 200, 227, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5fb3d0 0%, #4a9fc1 100%);
  box-shadow: 0 8px 25px rgba(126, 200, 227, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 2px solid #7ec8e3;
  box-shadow: 0 4px 15px rgba(126, 200, 227, 0.1);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #7ec8e3 0%, #5fb3d0 100%);
  border-color: #5fb3d0;
  box-shadow: 0 8px 25px rgba(126, 200, 227, 0.3);
  transform: translateY(-2px);
}

/* Enhanced feature cards */
.feature-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(126, 200, 227, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  background: linear-gradient(135deg, #7ec8e3 0%, #5fb3d0 100%);
  box-shadow: 0 8px 20px rgba(126, 200, 227, 0.3);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 30px rgba(126, 200, 227, 0.4);
}

/* Widget Styles */
:host {
  all: initial;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1f2937;
  box-sizing: border-box;
}

:host *,
:host *::before,
:host *::after {
  box-sizing: border-box;
}

.nw-container {
  @apply fixed z-[9999];
}

.nw-bubble {
  @apply cursor-pointer;
  @apply flex items-center justify-center;
  @apply transition-all duration-300 hover:scale-105;
  background: #000c66;
  position: relative;
  border: none;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  width: auto;
  height: 56px;
  padding: 8px 16px;
  min-width: 120px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nw-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nw-bubble-content {
  @apply flex items-center justify-center;
  @apply gap-3;
  width: 100%;
  height: 100%;
  padding: 0;
}

.nw-bubble-avatar {
  @apply rounded-full object-cover;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nw-bubble-name {
  @apply text-xs font-semibold text-white;
  @apply text-center;
  @apply truncate;
  max-width: 100%;
  line-height: 1;
  font-size: 9px;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.nw-bubble-text {
  @apply text-sm font-semibold text-white;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
  font-weight: 600;
  white-space: nowrap;
}

.nw-bubble-wrapper {
  @apply fixed flex items-center gap-3;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  cursor: grab;
  transition: transform 0.2s ease;
}

.nw-bubble-wrapper.dragging {
  cursor: grabbing;
  transform: scale(1.05);
  z-index: 10000;
}

.nw-bot-name {
  @apply text-sm font-medium text-gray-700 bg-white px-3 py-2 rounded-lg shadow-md;
  @apply whitespace-nowrap;
  /* Legacy class - kept for compatibility */
}

.nw-panel {
  @apply fixed bg-white rounded-xl shadow-2xl;
  @apply flex flex-col;
  width: 400px;
  height: 600px;
  bottom: 90px;
  right: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.nw-panel.dragging {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.nw-badge {
  @apply absolute top-0 right-0 text-white;
  @apply rounded-full w-5 h-5 flex items-center justify-center;
  @apply text-xs font-bold;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  animation: pulse 2s infinite;
  color: #ffffff;
  transform: translate(25%, -25%);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.nw-message {
  @apply p-3 rounded-2xl;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  animation: fadeInUp 0.3s ease-out;
  max-width: 75%;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.nw-message-user {
  background: linear-gradient(135deg, #0084ff 0%, #0066cc 100%);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 18px;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.nw-message-bot {
  background: #f0f2f5;
  color: #1f2937;
  border-bottom-left-radius: 4px;
  border-top-right-radius: 18px;
  border-top-left-radius: 18px;
  border-bottom-right-radius: 18px;
  border: 1px solid #e4e6eb;
}

.nw-message-bot .contact-info {
  @apply font-medium text-blue-600;
}

.nw-message-bot .website-link {
  @apply font-medium text-blue-600 underline;
}

.nw-message-bot .email-link {
  @apply font-medium text-green-600;
}

.nw-message-bot .phone-link {
  @apply font-medium text-purple-600;
}

.nw-message-bot .section-header {
  @apply font-bold text-gray-800 text-sm mt-3 block;
  border-bottom: 2px solid #7ec8e3;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.nw-message-bot .feature-name {
  @apply font-semibold text-gray-700;
  color: #374151;
}

.nw-message-bot .action-phrase {
  @apply font-bold text-blue-700 text-sm mt-3 block;
  background: rgba(126, 200, 227, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #7ec8e3;
}

.nw-input {
  @apply w-full px-4 py-2 border-2 border-gray-200 rounded-lg;
  @apply focus:outline-none;
  border-color: #7ec8e3;
}

.nw-input:focus {
  border-color: #000c66;
}

.nw-typing {
  @apply flex gap-1;
}

.nw-typing span {
  @apply w-2 h-2 bg-gray-400 rounded-full animate-bounce;
}

.nw-message-list {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

.nw-message-list::-webkit-scrollbar {
  width: 4px;
}

.nw-message-list::-webkit-scrollbar-track {
  background: transparent;
}

.nw-message-list::-webkit-scrollbar-thumb {
  background-color: #e5e7eb;
  border-radius: 2px;
}

.nw-suggestion-bubble {
  background: rgba(126, 200, 227, 0.1);
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px;
  animation: fadeInUp 0.3s ease-out;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.nw-suggestion-chip {
  @apply px-2 py-1 text-xs rounded-full;
  background: #7ec8e3;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
  font-weight: 400;
  white-space: normal;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: calc(100% - 16px);
  min-width: 60px;
  flex-shrink: 0;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 400px) {
  .nw-suggestion-chip {
    font-size: 10px;
    padding: 6px 8px;
    max-width: calc(100% - 12px);
  }
}

@media (max-width: 320px) {
  .nw-suggestion-chip {
    font-size: 9px;
    padding: 4px 6px;
    max-width: calc(100% - 8px);
    white-space: normal;
    line-height: 1.2;
    min-height: auto;
    text-align: center;
  }
}

.nw-suggestion-chip:hover {
  background: #5fb3d0;
  transform: translateY(-1px);
}

.nw-suggestion-chip:active {
  transform: translateY(0);
}

.nw-emoji-picker-container {
  @apply absolute bottom-full right-0 mb-2 z-50;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
  min-width: 320px;
  max-width: 400px;
}

.nw-emoji-picker {
  --background: #ffffff;
  --border-color: #e5e7eb;
  --text-color: #1f2937;
  --category-color: #6b7280;
  --hover-background: #f3f4f6;
  --selected-background: #7ec8e3;
  --selected-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 100%;
  height: 350px;
}

.nw-file-uploader {
  @apply relative;
}

.nw-attach-btn {
  @apply p-2 rounded-lg hover:bg-gray-100 transition-colors;
  @apply border-0 bg-transparent cursor-pointer;
  color: #64748b;
}

.nw-attach-btn:hover {
  color: #3b82f6;
}

.nw-file-uploader--dragover .nw-attach-btn {
  @apply bg-blue-50;
  color: #3b82f6;
}

.nw-file-error {
  @apply absolute bottom-full left-0 mb-2 px-3 py-2;
  @apply bg-red-500 text-white text-sm rounded-lg shadow-lg;
  animation: slideUpFade 0.3s ease;
}

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

.nw-file-preview-container {
  @apply flex flex-wrap gap-2 px-4 pt-3 pb-0;
  display: none;
}

.nw-file-preview-item {
  @apply relative flex items-center gap-2 p-2 bg-gray-50 rounded-lg;
  @apply border border-gray-200;
  min-width: 200px;
  max-width: 100%;
}

.nw-file-preview-thumb {
  @apply flex items-center justify-center w-10 h-10 bg-white rounded;
  @apply border border-gray-200 flex-shrink-0;
  overflow: hidden;
}

.nw-file-preview-thumb img {
  @apply w-full h-full object-cover;
}

.nw-file-preview-thumb svg {
  color: #9ca3af;
}

.nw-file-preview-info {
  @apply flex flex-col flex-1 min-w-0;
}

.nw-file-preview-name {
  @apply text-sm font-medium text-gray-900 truncate;
}

.nw-file-preview-size {
  @apply text-xs text-gray-500;
}

.nw-file-preview-remove {
  @apply p-1 rounded hover:bg-gray-200 transition-colors;
  @apply border-0 bg-transparent cursor-pointer shrink-0;
  color: #6b7280;
}

.nw-file-preview-remove:hover {
  color: #ef4444;
}

.nw-file-preview-progress {
  @apply absolute bottom-0 left-0 right-0 h-1 bg-gray-200 rounded-b-lg;
  overflow: hidden;
}

.nw-file-preview-progress-bar {
  @apply h-full bg-blue-500 transition-all duration-300;
}
