/* Base styles */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px; /* Margin bottom by footer height */
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge, and Firefox */
.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px; /* Set the fixed height of the footer here */
  line-height: 60px; /* Vertically center the text there */
}

/* Custom styles */
.card-hover:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Custom orange badge for High priority feedback */
.bg-orange {
  background-color: #fd7e14 !important;
  color: white !important;
}

.border-orange {
  border-color: #fd7e14 !important;
}

/* Banner styles */
.banner {
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 0.25rem;
}

.banner-urgent {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.banner-important {
  background-color: #fff3cd;
  border-color: #ffeeba;
  color: #856404;
}

/* Card styles */
.card-urgent .card-header {
  background-color: #f8d7da;
  color: #721c24;
}

.card-important .card-header {
  background-color: #fff3cd;
  color: #856404;
}

.card-pinned .card-header {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* Enhanced card styles */
.card {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card-header {
  border-bottom: none;
}

.card-header:first-child {
  border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  padding: 1rem 1.5rem;
}

/* List group enhancements */
.list-group-item {
  transition: all 0.2s ease;
  border-left: none;
  border-right: none;
}

.list-group-item:first-child {
  border-top: none;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item-action:hover {
  transform: translateX(5px);
}

/* Badge enhancements */
.badge {
  font-weight: 500;
  padding: 0.5em 0.75em;
}

.badge.rounded-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

/* Form styles */
.form-container {
  max-width: 800px;
  margin: 0 auto;
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.form-buttons-left {
  display: flex;
  gap: 0.5rem;
}

.form-buttons-right {
  display: flex;
  gap: 0.5rem;
}

/* Form control enhancements */
.form-control, .form-select {
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  opacity: 0.8;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-group.focused label {
  color: #0d6efd;
}

/* Input groups */
.input-group-text {
  background-color: #f8f9fa;
  border-color: #ced4da;
}

/* Table enhancements */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table-hover tbody tr {
  transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.table th {
  font-weight: 600;
  border-top: none;
}

.table-responsive {
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Mobile-responsive table improvements */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.5rem;
}

/* Ensure tables maintain minimum width on mobile */
.table-responsive .table {
  min-width: 800px; /* Adjust based on content needs */
  margin-bottom: 0;
}

/* Mobile table scrolling indicator */
.table-responsive::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to left, rgba(255,255,255,0.8), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-responsive:not(:hover)::after {
  opacity: 1;
}

/* Mobile-specific table adjustments */
@media (max-width: 768px) {
  .table-responsive {
    border-radius: 0;
    margin: 0 -15px; /* Extend to screen edges */
    padding: 0 15px;
  }
  
  .table-responsive .table {
    min-width: 900px; /* Wider minimum for mobile */
  }
  
  /* Hide less important columns on smaller screens */
  .table .d-none.d-md-table-cell {
    display: none !important;
  }
  
  .table .d-none.d-lg-table-cell {
    display: none !important;
  }
  
  .table .d-none.d-xl-table-cell {
    display: none !important;
  }
  
  /* Fix column header icon alignment on mobile */
  .table thead th {
    white-space: nowrap;
    vertical-align: middle;
  }
  
  .table thead th i {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25rem;
    font-size: 0.875rem;
  }
  
  /* Ensure icons and text stay on same line */
  .table thead th .bi {
    flex-shrink: 0;
  }
  
  /* Ensure action buttons remain visible */
  .table .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Add scroll hint for mobile users */
  .table-responsive::before {
    content: 'Scroll horizontally to see more →';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
    opacity: 0.7;
  }
}

/* Extra small screens */
@media (max-width: 576px) {
  .table-responsive .table {
    min-width: 700px; /* Smaller minimum for very small screens */
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.25rem; /* Tighter padding */
    font-size: 0.875rem;
  }
  
  /* Ensure icons remain properly aligned on very small screens */
  .table thead th {
    font-size: 0.8rem;
  }
  
  .table thead th i {
    font-size: 0.75rem;
    margin-right: 0.2rem;
  }
}

/* General table header improvements for all screen sizes */
.table thead th {
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  background-color: #f8f9fa;
}

.table thead th i {
  color: #6c757d;
  margin-right: 0.5rem;
}

/* Specific fixes for problematic columns */
.table thead th[scope="col"] {
  display: table-cell;
  vertical-align: middle;
}

.table thead th[scope="col"] i.bi {
  display: inline;
  vertical-align: baseline;
}

/* Pagination enhancements */
.pagination {
  margin-bottom: 0;
}

.page-link {
  border-radius: 0.375rem;
  margin: 0 0.125rem;
  transition: all 0.2s ease;
}

.page-item.active .page-link {
  box-shadow: 0 0.125rem 0.25rem rgba(13, 110, 253, 0.2);
}

/* Button enhancements */
.btn {
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

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

.btn-primary {
  box-shadow: 0 0.125rem 0.25rem rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.3);
}

.btn-outline-primary:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.2);
}

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

@keyframes slideInLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

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

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

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-in-out;
}

.slide-in-right {
  animation: slideInRight 0.5s ease-in-out;
}

.slide-in-up {
  animation: slideInUp 0.5s ease-in-out;
}

.slide-in-down {
  animation: slideInDown 0.5s ease-in-out;
}

/* Dark mode styles */
[data-bs-theme="dark"] {
  --bs-body-bg: #222;
  --bs-body-color: #f8f9fa;
}

[data-bs-theme="dark"] .card {
  background-color: #333;
  border-color: #444;
}

[data-bs-theme="dark"] .card-header {
  background-color: #444;
  border-color: #555;
}

[data-bs-theme="dark"] .card-footer {
  background-color: #444;
  border-color: #555;
}

[data-bs-theme="dark"] .table {
  color: #f8f9fa;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #333;
  border-color: #555;
  color: #f8f9fa;
}

[data-bs-theme="dark"] .input-group-text {
  background-color: #444;
  border-color: #555;
  color: #f8f9fa;
}

/* Dark mode styles for bg-light elements */
[data-bs-theme="dark"] .bg-light {
  background-color: #2b3035 !important;
  color: #f8f9fa;
}

[data-bs-theme="dark"] .card.bg-light {
  background-color: #2b3035 !important;
  border-color: #495057;
}

[data-bs-theme="dark"] .card.bg-light .card-body {
  color: #f8f9fa;
}

[data-bs-theme="dark"] .card.bg-light .card-title {
  color: #f8f9fa;
}

[data-bs-theme="dark"] .card.bg-light .card-text {
  color: #dee2e6;
}

/* Responsive styles */
@media (max-width: 768px) {
  .form-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-buttons-left,
  .form-buttons-right {
    width: 100%;
    justify-content: center;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .table-responsive {
    border-radius: 0;
  }
  
  .badge.rounded-pill {
    width: 28px;
    height: 28px;
  }
}

/* Navbar styling to match footer text-white appearance */
.navbar.bg-primary .navbar-nav .nav-link,
.navbar.bg-primary .navbar-nav .nav-link.dropdown-toggle {
  color: #fff !important;
}

.navbar.bg-primary .navbar-nav .nav-link:hover,
.navbar.bg-primary .navbar-nav .nav-link:focus,
.navbar.bg-primary .navbar-nav .nav-link.dropdown-toggle:hover,
.navbar.bg-primary .navbar-nav .nav-link.dropdown-toggle:focus {
  color: #fff !important;
  opacity: 0.8;
}

.navbar.bg-primary .navbar-nav .nav-link.active,
.navbar.bg-primary .navbar-nav .nav-link.dropdown-toggle.show {
  color: #fff !important;
  font-weight: 500;
}

/* Ensure navbar brand also matches */
.navbar.bg-primary .navbar-brand {
  color: #fff !important;
}

.navbar.bg-primary .navbar-brand:hover,
.navbar.bg-primary .navbar-brand:focus {
  color: #fff !important;
  opacity: 0.8;
}

/* Password strength meter */
.password-strength-meter {
  height: 0.5rem;
  width: 100%;
  background-color: #e9ecef;
  border-radius: 0.25rem;
  margin-top: 0.25rem;
}

.password-strength-meter-fill {
  height: 100%;
  border-radius: 0.25rem;
  transition: width 0.3s ease;
}

.strength-weak {
  width: 25%;
  background-color: #dc3545;
}

.strength-fair {
  width: 50%;
  background-color: #ffc107;
}

.strength-good {
  width: 75%;
  background-color: #17a2b8;
}

.strength-strong {
  width: 100%;
  background-color: #28a745;
}

/* Feedback prompt styling */
.feedback-prompt {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.feedback-prompt-content {
  max-width: 300px;
}

.feedback-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.feedback-prompt-body {
  margin-bottom: 1rem;
}

.feedback-prompt-actions {
  display: flex;
  justify-content: flex-end;
}

/* Avatar Circles */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.avatar-circle-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.avatar-circle:hover,
.avatar-circle-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4);
}

/* Modal styling */
.modal-content {
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.modal-header {
  border-bottom: none;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  font-size: 1.25rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: none;
  padding: 1.5rem;
}

.modal-footer > button {
  margin: 0 0.5rem;
}
