/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Assistant Chatbot Styles */
.assistant-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.chatbot-toggle {
  display: none;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  outline: none;
}

.chatbot-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.chatbot-toggle.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-toggle.force-visible {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 40px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.chatbot-container.chatbot-hidden {
  display: none;
}

.chatbot-header {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.chatbot-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
}

.control-btn {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: background-color 0.2s;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chatbot-header h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.chatbot-header p {
  font-size: 14px;
  opacity: 0.9;
  margin: 5px 0 0 0;
}

.chatbot-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.context-info {
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  max-height: 400px;
}

.message {
  margin-bottom: 15px;
}

.user-message .message-content {
  background: #f59e0b;
  color: white;
  padding: 10px 15px;
  border-radius: 18px 18px 4px 18px;
  margin-left: auto;
  max-width: 80%;
  word-wrap: break-word;
}

.assistant-message .message-content {
  background: #f1f5f9;
  color: #334155;
  padding: 10px 15px;
  border-radius: 18px 18px 18px 4px;
  max-width: 80%;
  word-wrap: break-word;
}

.system-message {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}

.input-area {
  padding: 20px;
  border-top: 1px solid #e2e8f0;
  background: white;
}

.suggestions {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-btn:hover {
  background: #e2e8f0;
  color: #475569;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  padding: 10px 15px;
  font-size: 14px;
  resize: none;
  min-height: 20px;
  max-height: 100px;
  outline: none;
  transition: border-color 0.2s;
}

.message-input:focus {
  border-color: #8b5cf6;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.voice-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.voice-btn:hover {
  transform: translateY(-1px);
}

.voice-btn.recording {
  background: #ef4444 !important;
  color: white !important;
}

.voice-btn.recording .mic-icon {
  display: none;
}

.voice-btn.recording .stop-icon {
  display: block !important;
}

.typing-indicator {
  display: none;
}

.typing-indicator.show {
  display: block;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .chatbot-container {
    width: calc(100vw - 20px);
    height: calc(100vh - 40px);
    bottom: 10px;
    right: 10px;
  }
  
  .assistant-wrapper {
    bottom: 10px;
    right: 10px;
  }
  
  .chatbot-toggle {
    width: 50px;
    height: 50px;
  }
}

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



/* Line clamp utility for descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Video Player Improvements */
video:fullscreen {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
}

video:-webkit-full-screen {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
}

video:-moz-full-screen {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
}

/* Better video controls behavior */
.video-container {
  position: relative;
}

.video-container video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
