html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Keyboard Shortcuts Styles */
#shortcutsBtn {
  transition: all 0.3s ease;
  opacity: 0.8;
}

#shortcutsBtn:hover {
  opacity: 1;
  transform: scale(1.1);
}

#shortcutsBtn:active {
  transform: scale(0.95);
}

/* Keyboard key styling */
kbd {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  color: #495057;
  font-size: 0.875em;
  padding: 0.125rem 0.25rem;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* Shortcut hints in forms */
.shortcut-hint {
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
}

/* Auto-save notification animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.alert.position-fixed {
  animation: slideInRight 0.3s ease-out;
}

/* Enhanced form styling for calculation forms */
.calculation-form .form-group {
  margin-bottom: 1rem;
}

.calculation-form .card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.calculation-form .card-header {
  font-weight: 600;
}

/* Avatar styling for user management */
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 600;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 16px;
  font-weight: 600;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 20px;
  font-weight: 600;
}

/* Chatbot Styles */
#chatbotBtn {
  transition: all 0.3s ease;
  opacity: 0.8;
}

#chatbotBtn:hover {
  opacity: 1;
  transform: scale(1.1);
}

#chatbotBtn:active {
  transform: scale(0.95);
}

#chatbotModal .modal-content {
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.chatbot-modal-dialog {
  max-width: 50%;
  width: 50%;
  height: 90vh;
  margin: auto;
}

#chatbotMessages {
  background: #f8f9fa;
  min-height: 300px;
}

.message-bubble {
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#chatbotInput:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#chatbotSendBtn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  transition: all 0.3s ease;
}

#chatbotSendBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#chatbotSendBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Responsive adjustments for shortcuts and chatbot */
@media (max-width: 768px) {
  #shortcutsBtn, #chatbotBtn {
    width: 45px !important;
    height: 45px !important;
    font-size: 0.9rem;
  }
  
  .modal-dialog.modal-lg {
    margin: 0.5rem;
  }
  
  .chatbot-modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    margin: 0 !important;
  }
  
  .message-bubble {
    max-width: 85% !important;
    font-size: 1rem !important;
  }
  
  .ai-avatar {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}