/* RecoverCMS Core - Custom Styles - Inspire Design System */

/* ============================================
   TYPOGRAPHY & BASE STYLES
   ============================================ */

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #212529;
  background-color: #ffffff;
}

/* ============================================
   HEADER
   ============================================ */

header.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

header .navbar-brand {
  font-weight: 700;
  color: #0d6efd;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */

.sidebar {
  min-height: calc(100vh - 60px);
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  padding: 1rem;
}

/* User Profile Card */
.sidebar-user {
  background-color: #e9ecef;
  text-align: center;
  padding: 1rem;
  border-radius: 0.5rem;
}

/* Avatar Circle */
.avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.25rem;
  margin: 0 auto;
}

/* Navigation Links */
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: #212529;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
  font-weight: 500;
}

.sidebar-link:hover {
  background-color: #e9ecef;
  color: #0d6efd;
  text-decoration: none;
}

.sidebar-link.active,
.sidebar-link[aria-current="page"] {
  background-color: #0d6efd;
  color: white;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
}

/* Separator Line */
.sidebar-sep {
  height: 1px;
  background-color: #dee2e6;
  margin: 0.5rem 0;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.content-area {
  background-color: #ffffff;
  min-height: calc(100vh - 60px);
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

.hover-lift {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   BUTTONS - STANDARDIZED MEDICAL STYLE
   ============================================ */

/* Base button styles */
.btn {
  font-weight: 500;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  border-width: 1px;
  border-style: solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  text-decoration: none;
  line-height: 1.5;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:active {
  transform: translateY(0);
}

/* Button sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 4px;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.0625rem;
  border-radius: 8px;
}

/* ============================================
   OUTLINE BUTTONS - PRIMARY CRUD STYLE
   Medical aesthetic with subtle borders
   ============================================ */

.btn-outline-primary {
  color: #0d6efd;
  border-color: #dee2e6;
  background: white;
}

.btn-outline-primary:hover {
  color: white;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-outline-success {
  color: #198754;
  border-color: #dee2e6;
  background: white;
}

.btn-outline-success:hover {
  color: white;
  background-color: #198754;
  border-color: #198754;
}

.btn-outline-info {
  color: #0dcaf0;
  border-color: #dee2e6;
  background: white;
}

.btn-outline-info:hover {
  color: #000;
  background-color: #0dcaf0;
  border-color: #0dcaf0;
}

.btn-outline-warning {
  color: #ffc107;
  border-color: #dee2e6;
  background: white;
}

.btn-outline-warning:hover {
  color: #000;
  background-color: #ffc107;
  border-color: #ffc107;
}

.btn-outline-danger {
  color: #dc3545;
  border-color: #dee2e6;
  background: white;
}

.btn-outline-danger:hover {
  color: white;
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-secondary {
  color: #6c757d;
  border-color: #dee2e6;
  background: white;
}

.btn-outline-secondary:hover {
  color: white;
  background-color: #6c757d;
  border-color: #6c757d;
}

/* ============================================
   SEMANTIC CRUD BUTTON CLASSES
   Use these for consistent CRUD operations
   ============================================ */

/* View/Details button - Always use btn-action-view */
.btn-action-view {
  color: #0d6efd;
  border-color: #dee2e6;
  background: white;
}

.btn-action-view:hover {
  color: white;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Edit button - Always use btn-action-edit */
.btn-action-edit {
  color: #198754;
  border-color: #dee2e6;
  background: white;
}

.btn-action-edit:hover {
  color: white;
  background-color: #198754;
  border-color: #198754;
}

/* Delete button - Always use btn-action-delete */
.btn-action-delete {
  color: #dc3545;
  border-color: #dee2e6;
  background: white;
}

.btn-action-delete:hover {
  color: white;
  background-color: #dc3545;
  border-color: #dc3545;
}

/* ============================================
   SOLID BUTTONS - USE SPARINGLY
   Only for primary actions (Save, Submit, etc.)
   ============================================ */

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
  color: white;
}

.btn-success {
  background-color: #198754;
  border-color: #198754;
  color: white;
}

.btn-success:hover {
  background-color: #157347;
  border-color: #146c43;
  color: white;
}

.btn-info {
  background-color: #0dcaf0;
  border-color: #0dcaf0;
  color: #000;
}

.btn-info:hover {
  background-color: #31d2f2;
  border-color: #25cff2;
  color: #000;
}

.btn-warning {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #000;
}

.btn-warning:hover {
  background-color: #ffca2c;
  border-color: #ffc720;
  color: #000;
}

.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #bb2d3b;
  border-color: #b02a37;
  color: white;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5c636a;
  border-color: #565e64;
  color: white;
}

/* ============================================
   BUTTON GROUPS
   ============================================ */

/* Action button group for table rows */
.btn-group-action {
  display: inline-flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

/* ============================================
   BUTTON STATES
   ============================================ */

.btn:focus,
.btn:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.5);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================
   TABLES
   ============================================ */

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  vertical-align: middle;
}

.table-hover tbody tr {
  transition: background-color 0.15s ease-in-out;
}

.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

.table-light {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

thead th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  color: #6c757d;
  border-bottom: 2px solid #dee2e6;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #212529;
}

.form-control, .form-select {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
}

.form-control:focus, .form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  outline: 0;
}

.text-danger {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ============================================
   BREADCRUMBS - MODERN ROUNDED STYLE
   ============================================ */

.breadcrumb {
  background-color: #f1f3f5;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  color: #868e96;
  font-size: 0.9375rem;
}

.breadcrumb-item + .breadcrumb-item {
  padding-left: 0.75rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "\203A";
  color: #adb5bd;
  padding-right: 0.75rem;
  font-size: 1.125rem;
}

.breadcrumb-item a {
  color: #868e96;
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.breadcrumb-item a:hover {
  color: #495057;
}

.breadcrumb-item a i {
  font-size: 1rem;
  color: #adb5bd;
}

.breadcrumb-item.active {
  color: #212529;
  font-weight: 500;
}

/* ============================================
   BADGES


   ============================================ */

.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  font-size: 0.875rem;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-weight: 700;
  color: #212529;
  margin-bottom: 0;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: #f8f9fa;
  padding: 1rem 0;
  margin-top: 2rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.slide-in {
  animation: slideIn 0.4s ease-out;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.fw-medium {
  font-weight: 500;
}

.fw-semibold {
  font-weight: 600;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .card-body {
    padding: 1rem;
  }
  
  .table {
    font-size: 0.875rem;
  }
}

/* ============================================
   DATATABLES CUSTOMIZATION
   ============================================ */

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 0.5rem 0;
}

/* Make the length menu dropdown wider */
.dataTables_wrapper .dataTables_length select {
  width: 70px;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  min-width: 70px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #0d6efd !important;
  border-color: #0d6efd !important;
  color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #e9ecef !important;
  border-color: #dee2e6 !important;
  color: #212529 !important;
}
  border-left-color: #dc3545;
}

.alert-warning {
  border-left-color: #ffc107;
}

.alert-info {
  border-left-color: #17a2b8;
}

/* Button spacing */
.btn-group-action {
  display: flex;
  gap: 0.5rem;
}

/* Loading spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Form validation */
.field-validation-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.input-validation-error {
  border-color: #dc3545;
}

/* Navbar branding */
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  line-height: 60px;
  background-color: #f5f5f5;
}

/* Pagination */
.pagination {
  margin-top: 1rem;
}

/* DataTables custom styling */
.dataTables_wrapper {
  padding-top: 1rem;
}

/* Print view styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #dee2e6;
  }
}

/* Responsive helpers */
@media (max-width: 768px) {
  .btn-group-action {
    flex-direction: column;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
}

/* ============================================
   PUBLICATIONS REPORT VIEW STYLING
   ============================================ */

/* Remove all vertical borders and background shading from all tables */
.table {
  border-collapse: collapse;
}

.table th,
.table td {
  border-left: none !important;
  border-right: none !important;
}

.table thead th {
  border-top: 1px solid #000;
  border-bottom: 2px solid #000;
  background-color: transparent !important;
}

.table tbody tr {
  background-color: transparent !important;
}

.table-hover tbody tr:hover {
  background-color: transparent !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: transparent !important;
}

/* Report view table styling to match old system */
#tblPublications.table-report-view {
  font-size: 0.875rem;
  width: 100%;
  border-collapse: collapse;
}

/* Remove all vertical borders and background shading */
#tblPublications.table-report-view th,
#tblPublications.table-report-view td {
  padding: 0.75rem 0.5rem;
  vertical-align: top;
  border-bottom: 1px solid #dee2e6;
  border-left: none;
  border-right: none;
  border-top: none;
  background-color: transparent !important;
}

/* Report view column widths */
#tblPublications .col-report:nth-child(1) {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

#tblPublications .col-report:nth-child(2) {
  width: 60%;
  word-wrap: break-word;
  white-space: normal;
}

#tblPublications .col-report:nth-child(3) {
  width: 15%;
}

#tblPublications .col-report:nth-child(4) {
  width: 20%;
}

/* Make Citation column text wrap properly */
#tblPublications.table-report-view .col-report:nth-child(2) {
  line-height: 1.5;
  word-break: break-word;
}

/* Clean table styling for report view - no background shading */
#tblPublications.table-report-view thead th {
  background-color: transparent !important;
  border-bottom: 2px solid #000;
  border-top: 1px solid #000;
  font-weight: 600;
  color: #000;
  border-left: none;
  border-right: none;
  cursor: default !important;
}

/* Remove sorting indicators in report view */
#tblPublications.table-report-view thead th.sorting,
#tblPublications.table-report-view thead th.sorting_asc,
#tblPublications.table-report-view thead th.sorting_desc {
  cursor: default !important;
  background-image: none !important;
  padding-right: 8px !important;
}

#tblPublications.table-report-view thead th::after,
#tblPublications.table-report-view thead th::before {
  display: none !important;
}

/* Remove row hover effects and background */
#tblPublications.table-report-view tbody tr:hover {
  background-color: transparent !important;
}

#tblPublications.table-report-view tbody tr {
  background-color: transparent !important;
}

/* Remove Bootstrap table striping/hover */
#tblPublications.table-report-view.table-hover tbody tr:hover {
  background-color: transparent !important;
}

#tblPublications.table-report-view.table-striped tbody tr:nth-of-type(odd) {
  background-color: transparent !important;
}

/* DataTables specific styling for report view */
#tblPublications.table-report-view_wrapper .dataTables_length,
#tblPublications.table-report-view_wrapper .dataTables_filter,
#tblPublications.table-report-view_wrapper .dataTables_info,
#tblPublications.table-report-view_wrapper .dataTables_paginate {
  font-size: 0.875rem;
}
