/* fa-styles.css - Finance Automation Complete Styles */

/* Gradient Classes */
.gradient-text {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-primary {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

/* Navbar blur effect */
.nav-blur {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/* Hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Fade in animation */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

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

/* ========================================
   CHATBOT STYLES - COMPLETE SECTION
   ======================================== */

#chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.chat-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.chat-toggle-btn:active {
  transform: scale(0.95);
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 550px;
  max-height: calc(100vh - 150px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chat-window.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

.chat-header {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

/* Registration Form Styles */
.registration-form-container {
  position: absolute;
  top: 56px; /* Below header */
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  flex-direction: column;
  z-index: 10;
  padding: 20px;
  overflow-y: auto;
}

.registration-form-container.hidden {
  display: none;
}

.registration-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.registration-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  text-align: center;
}

.registration-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  text-align: center;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-field input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.submit-registration-btn {
  width: 100%;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.submit-registration-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.submit-registration-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.registration-note {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

/* Chat Interface */
.chat-interface {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat-interface.hidden {
  display: none;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
  min-height: 0;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

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

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

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

.message {
  margin-bottom: 12px;
  display: flex;
  animation: messageSlideIn 0.3s ease;
}

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

.message-content {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.5;
}

.bot-message .message-content {
  background: white;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 12px 12px 12px 4px;
}

.user-message {
  justify-content: flex-end;
}

.user-message .message-content {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: white;
  border-radius: 12px 12px 4px 12px;
}

.chat-input-container {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}

.chat-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.chat-input:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  max-width: 70px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  #chatbot-container {
    bottom: 16px;
    right: 16px;
  }

  .chat-toggle-btn {
    width: 56px;
    height: 56px;
  }

  .chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 120px);
    bottom: 90px;
    right: 16px;
  }

  .registration-form-container {
    padding: 16px;
  }

  .registration-title {
    font-size: 20px;
  }

  .registration-subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .form-field {
    margin-bottom: 14px;
  }

  .form-field label {
    font-size: 13px;
  }

  .form-field input {
    padding: 9px 11px;
    font-size: 13px;
  }

  .submit-registration-btn {
    padding: 11px 20px;
    font-size: 14px;
  }
}
