/* Custom styles for Book Manager App */

/* Sidebar styling */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background: linear-gradient(180deg, #3a57e8 0%, #2f49d0 100%) !important;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar .sidebar-header {
  padding: 20px;
  background: transparent;
}

.sidebar .navbar-brand {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
}

.sidebar .navbar-brand .logo-title {
  color: #ffffff !important;
  margin: 0;
}

.sidebar .sidebar-body {
  padding: 0;
}

.sidebar .navbar-nav {
  padding: 0;
}

.sidebar .nav-item {
  list-style: none;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item.active .nav-link {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.sidebar .nav-link .icon {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar .nav-link .item-name {
  flex: 1;
}

.sidebar .static-item.disabled {
  color: rgba(255, 255, 255, 0.6) !important;
  padding: 12px 20px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.sidebar svg {
  color: currentColor;
}

/* Main content area */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  background: #f5f5f5;
}

/* Header styling */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.app-header .dropdown-toggle {
  color: #333;
  padding: 0;
}

.app-header .dropdown-toggle:hover {
  color: #3a57e8;
}

.app-header .dropdown-toggle::after {
  margin-left: 8px;
}

.content-inner {
  padding: 30px;
}

/* Ensure proper spacing */
.card {
  margin-bottom: 24px;
}

/* Chat page styling */
.chat-messages-area {
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.messages-container {
  display: flex;
  flex-direction: column;
}

.chat-input-area {
  background: #ffffff;
}

.chat-input-area .input-group textarea {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  resize: none;
}

.chat-input-area .input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.message-item {
  animation: fadeIn 0.3s ease-in;
}

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

.message-item.user-message .message-content {
  background: #dcf8c6 !important;
  border-left: 4px solid #25d366;
}

.message-item.ai-message .message-content {
  background: #ffffff !important;
  border-left: 4px solid #3a57e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.message-item.user-message .message-type {
  background: #25d366 !important;
}

.message-item.ai-message .message-type {
  background: #3a57e8 !important;
}

.message-content {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}

.chat-input-container textarea {
  resize: none;
}
