/**
 * @file
 * Fish Catalog module styles.
 */

/* Map picker in admin form */
#fish-map-picker {
  z-index: 1;
}

#fish-map-picker .leaflet-control-container .leaflet-top {
  z-index: 1000;
}

/* Catalog map */
#fish-catalog-map,
#fish-detail-map {
  z-index: 1;
}

/* Fish popup */
.fish-popup {
  font-family: inherit;
  line-height: 1.5;
}

/* Card line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Star rating buttons */
.fish-star-rating .star-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.15s ease;
}

/* Leaflet cluster overrides for theme consistency */
.marker-cluster-small {
  background-color: rgba(13, 148, 136, 0.3);
}
.marker-cluster-small div {
  background-color: rgba(13, 148, 136, 0.6);
  color: white;
  font-weight: 600;
}
.marker-cluster-medium {
  background-color: rgba(13, 148, 136, 0.4);
}
.marker-cluster-medium div {
  background-color: rgba(13, 148, 136, 0.7);
  color: white;
  font-weight: 600;
}
.marker-cluster-large {
  background-color: rgba(13, 148, 136, 0.5);
}
.marker-cluster-large div {
  background-color: rgba(13, 148, 136, 0.8);
  color: white;
  font-weight: 600;
}

/* Loading animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Fix Leaflet in Drupal admin */
.gin--dark-mode #fish-map-picker,
.gin--dark-mode #fish-catalog-map,
.gin--dark-mode #fish-detail-map {
  filter: none;
}

/* Multiple select styling */
#fish-filters select[multiple] {
  min-height: 38px;
  max-height: 120px;
}

/* Fish article hero image — override Drupal's inline width/height attributes */
.fish-hero-image {
  width: 100% !important;
  display: block;
}
.fish-hero-image > *,
.fish-hero-image div,
.fish-hero-image .field--name-field-image,
.fish-hero-image .field__items,
.fish-hero-image .field__item {
  width: 100% !important;
  display: block !important;
}
.fish-hero-image img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  display: block !important;
  border-radius: 0.75rem;
  object-fit: cover;
}

/* Active chip styling */
.species-chip.border-teal-500,
.amenity-chip.border-teal-500 {
  background-color: rgb(204 251 241) !important;
  border-color: rgb(20 184 166) !important;
  color: rgb(15 118 110) !important;
  font-weight: 600;
}

/* Review image lightbox */
.fish-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fish-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

.fish-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 36px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
  padding: 4px 12px;
}

.fish-lightbox-close:hover {
  color: #d1d5db;
}

.fish-lightbox-prev,
.fish-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 48px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  line-height: 1;
  z-index: 1;
}

.fish-lightbox-prev {
  left: 16px;
}

.fish-lightbox-next {
  right: 16px;
}

.fish-lightbox-prev:hover,
.fish-lightbox-next:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* ========================================================
   DARK MODE — Fish Article Detail Page
   ======================================================== */

/* Text colors */
.dark .fish-article h1,
.dark .fish-article h2,
.dark .fish-article h3 {
  color: #f3f4f6;
}

.dark .fish-article .text-gray-900 {
  color: #f3f4f6;
}
.dark .fish-article .text-gray-700 {
  color: #d1d5db;
}
.dark .fish-article .text-gray-600 {
  color: #d1d5db;
}
.dark .fish-article .text-gray-500 {
  color: #9ca3af;
}
.dark .fish-article .text-gray-400 {
  color: #6b7280;
}

/* Borders */
.dark .fish-article .border-gray-200 {
  border-color: #374151;
}
.dark .fish-article .border-gray-100 {
  border-color: #374151;
}
.dark .fish-article .border-gray-300 {
  border-color: #4b5563;
}

/* Backgrounds — bg-white handled by global theme CSS */
.dark .fish-article .bg-gray-50 {
  background-color: #1f2937;
}
.dark .fish-article .bg-gray-100 {
  background-color: #1f2937;
}

/* Colored tag/badge backgrounds */
.dark .fish-article .bg-teal-50 {
  background-color: rgba(13, 148, 136, 0.15);
}
.dark .fish-article .text-teal-700 {
  color: #5eead4;
}
.dark .fish-article .border-teal-200 {
  border-color: rgba(13, 148, 136, 0.3);
}

.dark .fish-article .bg-blue-50 {
  background-color: rgba(59, 130, 246, 0.15);
}
.dark .fish-article .text-blue-700 {
  color: #93c5fd;
}
.dark .fish-article .border-blue-200 {
  border-color: rgba(59, 130, 246, 0.3);
}

.dark .fish-article .bg-yellow-50 {
  background-color: rgba(234, 179, 8, 0.1);
}
.dark .fish-article .border-yellow-200 {
  border-color: rgba(234, 179, 8, 0.25);
}

.dark .fish-article .bg-green-50 {
  background-color: rgba(34, 197, 94, 0.1);
}
.dark .fish-article .border-green-200 {
  border-color: rgba(34, 197, 94, 0.25);
}

/* Review rating progress bar backgrounds */
.dark .fish-article .bg-gray-200 {
  background-color: #374151;
}

/* Review form inputs */
.dark .fish-article input[type="text"],
.dark .fish-article textarea {
  background-color: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}
.dark .fish-article input[type="text"]::placeholder,
.dark .fish-article textarea::placeholder {
  color: #6b7280;
}

/* File input */
.dark .fish-article input[type="file"] {
  color: #9ca3af;
}

/* Star rating text-gray-300 unselected */
.dark .fish-article .star-btn {
  color: #4b5563;
}

/* Sidebar cards — bg-white handled by global, but borders need override */
.dark .fish-article aside .bg-white {
  background-color: #1f2937;
}

/* Sidebar contact links */
.dark .fish-article .text-teal-600 {
  color: #2dd4bf;
}
.dark .fish-article .hover\:text-teal-700:hover {
  color: #5eead4;
}

/* Review images border */
.dark .fish-article .review-images-container img {
  border-color: #374151;
}

/* ========================================================
   DARK MODE — Fish Catalog Page (/fish)
   ======================================================== */

.dark .fish-catalog .text-gray-900 {
  color: #f3f4f6;
}
.dark .fish-catalog .text-gray-700 {
  color: #d1d5db;
}
.dark .fish-catalog .text-gray-600 {
  color: #d1d5db;
}
.dark .fish-catalog .text-gray-500 {
  color: #9ca3af;
}
.dark .fish-catalog .text-gray-400 {
  color: #6b7280;
}

/* Filter panel */
.dark .fish-catalog .bg-white {
  background-color: #1f2937;
}
.dark .fish-catalog .border-gray-100 {
  border-color: #374151;
}
.dark .fish-catalog .border-gray-200 {
  border-color: #374151;
}
.dark .fish-catalog .border-gray-300 {
  border-color: #4b5563;
}

/* Selects */
.dark .fish-catalog select {
  background-color: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

/* Chips */
.dark .species-chip,
.dark .amenity-chip {
  background-color: #1f2937;
  border-color: #4b5563;
  color: #d1d5db;
}
.dark .species-chip:hover,
.dark .amenity-chip:hover {
  border-color: #2dd4bf;
  color: #5eead4;
  background-color: rgba(13, 148, 136, 0.15);
}

/* Active chips in dark mode */
.dark .species-chip.border-teal-500,
.dark .amenity-chip.border-teal-500 {
  background-color: rgba(13, 148, 136, 0.2) !important;
  border-color: #14b8a6 !important;
  color: #5eead4 !important;
}

/* Pagination buttons */
.dark .fish-page-btn {
  color: #d1d5db;
}
.dark .fish-page-btn.bg-white {
  background-color: #1f2937;
  border-color: #4b5563;
}
.dark .fish-page-btn.bg-white:hover {
  background-color: #374151;
}

/* Empty state */
.dark .fish-catalog .bg-teal-50 {
  background-color: rgba(13, 148, 136, 0.15);
}

/* Fish cards in dark mode */
.dark .fish-card {
  background-color: #1f2937;
  border-color: #374151;
}
.dark .fish-card .text-gray-900 {
  color: #f3f4f6;
}
.dark .fish-card .text-gray-500 {
  color: #9ca3af;
}
.dark .fish-card .text-gray-400 {
  color: #6b7280;
}
.dark .fish-card .bg-gray-100 {
  background-color: #111827;
}
