/* Bootstrap 5 Compatible Site Styles */
/* Only minimal utilities that Bootstrap doesn't provide */

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Profile Photo Styles */
.profile-photo-icon {
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.profile-photo-icon img,
.profile-photo-icon div {
  display: inline-block;
  vertical-align: middle;
}

/* Focus styles for accessibility - maintaining Bootstrap's approach */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Sticky footer support */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Form floating label improvements */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom utilities not available in Bootstrap 5 */
.aspect-ratio-4-3 {
  aspect-ratio: 4/3;
}

.card-image-height {
  height: 280px;
}

/* Rating and Review Styles */
.rating-input {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.rating-star {
  cursor: pointer;
  font-size: 1.5rem;
  color: #6c757d;
  transition: color 0.2s ease-in-out;
  text-decoration: none;
}

.rating-star:hover {
  color: #ffc107;
  text-decoration: none;
}

.rating-star i {
  pointer-events: none;
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.review-card {
  transition: box-shadow 0.2s ease-in-out;
}

.review-card:hover {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.favorite-btn-active {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Enhanced pagination styles */
.page-link {
  border-radius: 6px;
  margin: 0 2px;
  border: 1px solid var(--bs-border-color);
  transition: all 0.2s ease-in-out;
}

.page-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-item.active .page-link {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Image loading and error handling */
.artwork-image {
  background-color: var(--bs-gray-100);
  position: relative;
}

.artwork-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
  animation: shimmer 1.5s infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.artwork-image.loading::before {
  opacity: 1;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.image-error {
  background-color: var(--bs-gray-200);
  color: var(--bs-gray-600);
}

[data-bs-theme="dark"] .image-error {
  background-color: var(--bs-gray-800);
  color: var(--bs-gray-400);
}

/* Style comparison specific styles */
.style-comparison-image {
  height: 150px;
}

.small-text {
  font-size: 0.75rem;
}

.style-progress {
  width: 100px;
  height: 8px;
  background-color: var(--bs-gray-200);
}

/* Enhanced list group styles for comparison summary */
.list-group-item {
  border: none !important;
  border-bottom: 1px solid var(--bs-border-color) !important;
}

.list-group-item:last-child {
  border-bottom: none !important;
}

/* Enhanced artwork thumbnail styles */
.artwork-thumbnail {
  transition: transform 0.2s ease-in-out;
  overflow: hidden;
}

.artwork-thumbnail:hover {
  transform: scale(1.05);
}

/* Ensure consistent image heights */
.artwork-thumbnail,
.image-error {
  height: 250px;
}

/* Enhanced loading states */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* User profile styles */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Collection styles */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.collection-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile-first Navigation Enhancements */
.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
}

/* Responsive navigation dropdown adjustments */
@media (max-width: 991.98px) {
  .navbar .dropdown-menu {
    position: fixed !important;
    top: auto !important;
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1055;
  }

  /* Ensure dropdown appears over other content on mobile */
  .navbar .dropdown-menu.show {
    display: block;
    transform: none !important;
  }
}

/* Navigation state management for better UX */
.navbar-collapse.collapsing {
  transition: height 0.35s ease;
}

/* Ensure dropdown closes when clicking outside on mobile */
@media (max-width: 991.98px) {
  .dropdown-menu.show {
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Improve accessibility for keyboard navigation */
.dropdown-item:focus,
.nav-link:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .dropdown-menu {
    border: 2px solid var(--bs-border-color);
  }

  .dropdown-item {
    border-bottom: 1px solid var(--bs-border-color);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .dropdown-item,
  #color-mode-toggle,
  .navbar-collapse {
    transition: none;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

/* Theme loading styles removed - using fixed theme */

/* Better visual hierarchy in dropdown */
.dropdown-header + .dropdown-item {
  margin-top: 0.25rem;
}

.dropdown-divider + .dropdown-header {
  margin-top: 0.5rem;
}

/* Consistent spacing for nested elements */
.dropdown-menu .px-3 {
  margin: 0.25rem 0;
}

/* Theme dropdown styles removed - using fixed theme */

/* Focus management for screen readers */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Search Bar Component Styles */
.search-bar-container {
  position: relative;
}

.search-bar-container .card {
  background: var(--bs-light);
  border: 1px solid var(--bs-border-color-translucent);
  transition: all 0.3s ease;
}

.search-bar-container .card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px);
}

.search-bar-container .input-group-text {
  border: none;
  font-size: 1.1rem;
}

.search-bar-container .form-control {
  border: none;
  box-shadow: none;
  font-size: 1.1rem;
}

.search-bar-container .form-control:focus {
  border: none;
  box-shadow: 0 0 0 0.2rem rgba(37, 140, 251, 0.25);
}

.search-bar-container .btn {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Mobile responsiveness for search bar */
@media (max-width: 767.98px) {
  .search-bar-container .form-control {
    font-size: 1rem;
  }

  .search-bar-container .btn {
    font-size: 0.9rem;
  }

  .search-bar-container .input-group-text {
    font-size: 1rem;
  }
}

/* Search results badge styling */
.search-bar-container .badge {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

/* Focus trap for better accessibility */
.search-bar-container .form-control:focus + .input-group-text {
  background-color: var(--bs-primary);
  color: white;
}

/* Fixed theme styles - theme indicators removed */

/* Debug information styling for development */
.webspark-debug-info {
  position: fixed;
  top: 60px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.75rem;
  max-width: 300px;
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.webspark-debug-info.show {
  opacity: 1;
}

@media (max-width: 768px) {
  .webspark-debug-info {
    display: none !important;
  }
}

/* Theme switcher styles removed - using fixed theme */

/* Fixed light mode styles */
