/* Styles for Libris Scriptorium - Cozy Library Dashboard */

/* Typography Custom Classes */
.font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

body {
  font-family: 'Lora', Georgia, serif;
}

/* Sidebar Tab Styling */
.tab-btn {
  color: #C6AC8F;
  background-color: transparent;
  transition: all 0.2s ease-in-out;
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.025em;
}

.tab-btn:hover {
  color: #F5F2EB;
  background-color: #3E2723;
}

.tab-btn.active-tab {
  color: #FAF5EB;
  background-color: #8B5E3C;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  border-left: 4px solid #E6DBC6;
}

/* Parchment Input Fields styling */
.parchment-input {
  background-color: #FAF9F3 !important;
  border-color: #D2B48C !important;
  color: #2C1D11 !important;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transition: all 0.2s ease-in-out;
}

.parchment-input:focus {
  background-color: #FAFDF6 !important;
  border-color: #8B5E3C !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.15) !important;
}

/* Stat Card Hover Effects */
.metric-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  background-image: linear-gradient(145deg, #FAF6EC, #F4ECE0);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(139, 94, 60, 0.1), 0 4px 6px -2px rgba(139, 94, 60, 0.05);
}

/* Preset Query Button style */
.preset-query-btn {
  transition: all 0.2s ease;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.preset-query-btn:hover {
  transform: translateX(3px);
  border-color: #8B5E3C;
  color: #3E2723;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F4EFE6;
}

::-webkit-scrollbar-thumb {
  background: #C6AC8F;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8B5E3C;
}

/* SQL Console scrollbar styling */
#sqlQueryText::-webkit-scrollbar-track {
  background: #1E110A;
}

#sqlQueryText::-webkit-scrollbar-thumb {
  background: #4A2D1B;
}

#sqlQueryText::-webkit-scrollbar-thumb:hover {
  background: #8B5E3C;
}

/* Smooth Table Row Transitions */
tbody tr {
  transition: background-color 0.15s ease-in-out;
}

tbody tr:hover {
  background-color: #FDF9F2 !important;
}

/* Badge Styling */
.badge-returned {
  background-color: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.badge-borrowed {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.badge-overdue {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* Custom transitions and loader overlays */
#loadingOverlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Focus styles for tables inside dark shells */
.dark-table-head {
  background-color: #2B1810;
  color: #EAE0D5;
}

/* Styling specifically for the SQL table values to prevent overflow and keep standard look */
#sqlResultBody td {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

#sqlResultHead th {
  padding: 0.5rem 1rem;
  font-weight: 700;
  border-bottom: 2px solid #8B5E3C;
}
