/* ===========================
   Gemini Chat - Bootstrap Enhanced Styles
   =========================== */

/* Custom Properties */
:root {
  --sidebar-width: 280px;
}

/* Base Body */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* ===========================
   Sidebar Styles
   =========================== */
.sidebar {
  width: var(--sidebar-width);
  position: relative;
  transition: transform 0.3s ease;
}

.sidebar .btn {
  transition: all 0.2s ease;
}

.sidebar .btn:hover {
  transform: translateX(2px);
}

.sidebar .btn-light {
  border: none;
  background: transparent;
}

.sidebar .btn-light:hover {
  background: #f8f9fa;
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white !important;
}

.brand-icon i {
  color: white !important;
}

/* Mobile Sidebar */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
  }
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
}

/* ===========================
   Header Styles
   =========================== */
header {
  height: 64px;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===========================
   Chat Messages
   =========================== */
#messages {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.msg {
  display: flex;
  gap: 12px;
  max-width: 80%;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg.assistant {
  align-self: flex-start;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.msg.user .msg-avatar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.msg.assistant .msg-avatar {
  background: #f1f3f4;
}

.msg-content {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px 16px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.msg.user .msg-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.msg.assistant .msg-content {
  background: #f8f9fa;
}

/* Typing Indicator */
.msg.typing .msg-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

/* ===========================
   Attachment Preview
   =========================== */
#attachmentPreview {
  display: none;
}

#attachmentPreview.active {
  display: block;
}

.attachment-preview-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.attachment-preview-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.attachment-info {
  flex: 1;
}

.attachment-name {
  font-weight: 500;
  font-size: 14px;
  color: #212529;
}

.remove-attachment {
  position: absolute;
  top: 8px;
  right: 8px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content-center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.remove-attachment:hover {
  background: #dc3545;
  color: white;
}

/* ===========================
   Input Area
   =========================== */
#promptInput {
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
}

#promptInput:focus {
  border-color: #ced4da;
}

.input-group .btn:first-child {
  border-right: none;
}

.input-group .btn:last-child {
  border-left: none;
}

/* ===========================
   Quick Prompts
   =========================== */
.prompt-card {
  transition: all 0.2s ease;
}

.prompt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===========================
   Welcome Screen
   =========================== */
#welcomeScreen {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.welcome-icon {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===========================
   Scrollbar Styling
   =========================== */
.overflow-auto::-webkit-scrollbar {
  width: 8px;
}

.overflow-auto::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.overflow-auto::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.overflow-auto::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ===========================
   Responsive Adjustments
   =========================== */
@media (max-width: 575.98px) {
  .msg {
    max-width: 90%;
  }
  
  .msg-content {
    font-size: 14px;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

/* ===========================
   Utilities
   =========================== */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Loading Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* Code Blocks in Messages */
.msg-content code {
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.msg.user .msg-content code {
  background: rgba(255,255,255,0.2);
}

.msg-content pre {
  background: rgba(0,0,0,0.05);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.msg-content pre code {
  background: none;
  padding: 0;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
  .sidebar,
  header,
  .input-area {
    display: none !important;
  }
  
  #messagesWrapper {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
}
a{
  text-decoration: none;
}

/* ===========================
   Pricing Modal Styles
   =========================== */

/* Benefits List */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.benefit-item i {
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 2px;
}

/* Billing Toggle */
.billing-toggle {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.billing-toggle .form-check {
  margin: 0;
}

.billing-toggle .form-check-input {
  cursor: pointer;
}

.billing-toggle .form-check-label {
  cursor: pointer;
  margin-left: 8px;
}

.billing-toggle .badge {
  font-size: 11px;
  padding: 3px 8px;
}

/* Pricing Plans */
.pricing-plans {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-card {
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.pricing-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.pricing-card.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.pricing-card h5 {
  color: #212529;
  font-size: 16px;
  margin-bottom: 4px;
}

.pricing-card .price-yearly,
.pricing-card .price-monthly {
  color: #667eea;
  white-space: nowrap;
}

/* Modal Customization */
#pricingModal .modal-dialog {
  max-width: 600px;
}

#pricingModal .modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#pricingModal .modal-header {
  padding: 24px 24px 16px;
}

#pricingModal .modal-title {
  font-size: 24px;
  color: #212529;
}

#pricingModal .modal-body {
  padding: 16px 24px 24px;
}

#subscribeBtn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#subscribeBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive Modal */
@media (max-width: 575.98px) {
  #pricingModal .modal-dialog {
    margin: 0.5rem;
  }
  
  #pricingModal .modal-title {
    font-size: 20px;
  }
  
  .pricing-card h5 {
    font-size: 14px;
  }
  
  .pricing-card .price-yearly,
  .pricing-card .price-monthly {
    font-size: 16px;
  }
  
  .billing-toggle {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px !important;
  }
}

/* ===========================
   Voice / Text-to-Speech Styles
   =========================== */

/* Speak Button for Messages */
.msg {
  position: relative;
}

.msg-speak-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  background: white;
  border: 1px solid #dee2e6;
}

.msg:hover .msg-speak-btn {
  opacity: 1;
}

.msg-speak-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: scale(1.1);
}

.msg-speak-btn.speaking {
  opacity: 1;
  background: #dc3545;
  color: white;
  border-color: #dc3545;
  animation: pulse-speak 1.5s infinite;
}

@keyframes pulse-speak {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Voice Settings Modal */
#voiceSettingsModal .modal-content {
  border-radius: 12px;
}

#voiceSettingsModal .form-range {
  cursor: pointer;
}

#voiceSettingsModal .form-range::-webkit-slider-thumb {
  background: #667eea;
  cursor: pointer;
}

#voiceSettingsModal .form-range::-moz-range-thumb {
  background: #667eea;
  cursor: pointer;
}

#voiceSettingsModal .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

/* Voice Settings Button */
#voiceSettingsBtn {
  transition: all 0.2s ease;
}

#voiceSettingsBtn:hover {
  transform: scale(1.05);
}

#voiceSettingsBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile adjustments for message speak button */
@media (max-width: 767.98px) {
  .msg-speak-btn {
    opacity: 1;
    bottom: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}
a{text-decoration: none;}