/* Bootstrap customizations and component-specific styles */

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Tabs styling */
.nav-tabs .nav-link {
  cursor: pointer;
  transition: all 0.3s;
}

.nav-tabs .nav-link:hover {
  border-color: #dee2e6 #dee2e6 #dee2e6;
}

/* Collection grid - 3 cards per row, narrower container */
#collection-grid {
  max-width: 600px;
  margin: 0 auto;
}

/* Similar thumbs - 3 cards per row, narrower container */
#similar-thumbs {
  max-width: 600px;
  margin: 0 auto;
}

/* Gallery cards */
.gallery-card,
.collection-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  height: 100%;
}

.gallery-card:hover,
.collection-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  border-color: #0d6efd;
}

.gallery-card img,
.collection-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.collection-card img {
  max-height: 120px;
}

.gallery-card .card-body,
.collection-card .card-body {
  padding: 0.5rem 0.75rem;
}

.gallery-card .card-text,
.collection-card .card-text {
  margin: 0;
  font-size: 0.75rem;
  color: #6c757d;
}

.collection-card h5,
.collection-card .card-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.75rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-card p,
.collection-card .card-text {
  margin: 0;
  font-size: 0.625rem;
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-card .like-button {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: #ffc107;
  font-size: 0.875rem;
  padding: 0.125rem 0.375rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.25rem;
}

.collection-card .like-button.liked {
  color: #ffc107;
}

/* Similar thumbnails */
.similar-thumb {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  cursor: pointer;
  transition: all 0.3s;
  height: 100%;
}

.similar-thumb:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
  border-color: #0d6efd;
}

.similar-thumb img {
  width: 100%;
  aspect-ratio: 3/4;
  height: auto;
  object-fit: cover;
  border-radius: 0.25rem;
}

.similar-thumb span {
  font-size: 0.6875rem;
  color: #6c757d;
  text-align: center;
}

.thumb-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

.thumb-show {
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
}

/* Face selection */
#face-selection .card {
  transition: all 0.3s;
}

#face-selection .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

#face-selection .card.border-primary {
  border-width: 2px !important;
}

/* Detail card */
#detail-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#detail-image {
  transition: all 0.3s;
}

#detail-image:hover {
  opacity: 0.9;
}

#detail-like.liked {
  color: #ffc107 !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .collection-card img {
    max-height: 100px;
  }
  
  .collection-card .card-body {
    padding: 0.375rem 0.5rem;
  }
  
  .collection-card h5,
  .collection-card .card-title {
    font-size: 0.6875rem;
  }
  
  .collection-card p,
  .collection-card .card-text {
    font-size: 0.5625rem;
  }
}

@media (max-width: 576px) {
  #collection-grid {
    max-width: 100%;
  }
  
  .collection-card img {
    max-height: 140px;
  }
  
  #gallery .col-md-4,
  #gallery .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  #similar-thumbs .col-md-4,
  #similar-thumbs .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  #preview {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}
