/* 
  AI-Powered Systematic Review Tool
  Main Stylesheet
*/

/* Custom Variables */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
  }
  
  /* General Styles */
  body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    margin-bottom: 0;
    position: relative;
  }
  
  main {
    flex: 1;
  }
  
  /* Icon shape styling */
  .icon-shape {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    padding: 0.75rem;
    transition: transform 0.3s ease;
  }
  
  .icon-shape:hover {
    transform: scale(1.1);
  }
  
  /* Black ribbon styling */
  .black-ribbon {
    width: 100%;
    position: relative;
    margin-top: 3rem;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
  }
  
  /* Card enhancements for dashboard */
  .card.h-100 {
    transition: all 0.3s ease;
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
  }
  
  .card.h-100:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
  }
  
  /* Typography enhancements */
  h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
  }
  
  .text-primary {
    color: var(--primary-color) !important;
  }
  
  .bg-primary {
    background-color: var(--primary-color) !important;
  }
  
  /* Navbar customization */
  .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  
  .navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
  }
  
  .navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1);
  }
  
  .navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
    font-weight: 600;
  }
  
  /* Card enhancements */
  .card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.2s ease-in-out;
  }
  
  .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  }
  
  .card-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
  }
  
  .card-footer {
    border-top: 1px solid var(--gray-200);
    background-color: #fff;
  }
  
  /* Button enhancements */
  .btn {
    font-weight: 500;
    letter-spacing: 0.3px;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
  }
  
  .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  /* Form styling */
  .form-control {
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
  }
  
  .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
  }
  
  .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .form-floating label {
    padding: 0.75rem 1rem;
  }
  
  .form-floating .form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem;
  }
  
  /* Table enhancements */
  .table {
    vertical-align: middle;
  }
  
  .table th {
    font-weight: 600;
    color: var(--gray-700);
  }
  
  /* Badge styles */
  .badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
    border-radius: 0.375rem;
  }
  
  /* Alert styling */
  .alert {
    border: none;
    border-radius: 0.375rem;
  }
  
  /* Feature icon styling */
  .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
  }
  
  /* Footer styling */
  footer {
    margin-top: auto;
  }
  
  /* Sticky footer styling */
  .footer-sticky {
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 10;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
  }
  
  /* Animation effects */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .fade-in {
    animation: fadeIn 0.5s ease-in-out;
  }
  
  /* Utilities */
  .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
  }
  
  .shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
  }
  
  .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.125) !important;
  }
  
  /* Responsive adjustments */
  @media (max-width: 767.98px) {
    .container {
      padding-left: 1.25rem;
      padding-right: 1.25rem;
    }
    
    .card-body {
      padding: 1.25rem;
    }
    
    .display-4 {
      font-size: 2.5rem;
    }
  }
  
  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--gray-100);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
  }
  
  /* Project page specific styles */
  .abstract-text, .full-text-preview {
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: #fff;
  }
  
  .reference-card {
    transition: all 0.2s ease-in-out;
  }
  
  .reference-card:hover {
    transform: translateY(-2px);
  }
  
  /* Results page scrollable containers */
  .exclusion-reasons-container,
  .included-references-container,
  .excluded-references-container,
  .references-container {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-100);
    border-radius: 0.375rem;
  }
  
  .exclusion-reasons-container::-webkit-scrollbar,
  .included-references-container::-webkit-scrollbar,
  .excluded-references-container::-webkit-scrollbar,
  .references-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  
  .exclusion-reasons-container::-webkit-scrollbar-thumb,
  .included-references-container::-webkit-scrollbar-thumb,
  .excluded-references-container::-webkit-scrollbar-thumb,
  .references-container::-webkit-scrollbar-thumb {
    background-color: var(--gray-400);
    border-radius: 6px;
  }
  
  .exclusion-reasons-container::-webkit-scrollbar-track,
  .included-references-container::-webkit-scrollbar-track,
  .excluded-references-container::-webkit-scrollbar-track,
  .references-container::-webkit-scrollbar-track {
    background-color: var(--gray-100);
    border-radius: 6px;
  }
  
  .included-references-container .list-group-item {
    border-left: 3px solid var(--success-color);
    transition: background-color 0.2s ease;
  }
  
  .excluded-references-container .list-group-item {
    border-left: 3px solid var(--danger-color);
    transition: background-color 0.2s ease;
  }
  
  .included-references-container .list-group-item:hover {
    background-color: rgba(46, 204, 113, 0.05);
  }
  
  .excluded-references-container .list-group-item:hover {
    background-color: rgba(231, 76, 60, 0.05);
  }