/* Custom styles */
.thumbnail-container {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  position: relative;
}

.thumbnail-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #d1d5db;
}

/* Thumbnail image container */
.thumbnail-image-container {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

.thumbnail-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.thumbnail-container:hover .thumbnail-image {
  transform: scale(1.05);
}

/* Thumbnail info container */
.thumbnail-info {
  padding: 16px;
  border-top: 1px solid #f3f4f6;
}

.thumbnail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.thumbnail-title {
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  min-width: 120px;
}

.thumbnail-resolution {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

/* Button container */
.thumbnail-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Individual thumbnail format selector */
.thumbnail-format-selector {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  min-width: 60px;
}

.thumbnail-format-selector:hover {
  border-color: #9ca3af;
}

.thumbnail-format-selector:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Dark mode styles for format selector */
@media (prefers-color-scheme: dark) {
  .thumbnail-format-selector {
    background-color: #374151;
    color: #f9fafb;
    border-color: #4b5563;
  }
  
  .thumbnail-format-selector:hover {
    border-color: #6b7280;
  }
}

/* Download button style */
.download-button {
  flex: 2;
  padding: 8px 16px;
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.download-button:hover {
  background-color: #dc2626;
}

.download-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.5);
}

/* Preview button */
.preview-button {
  flex: 1;
  padding: 8px 12px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.875rem;
}

.preview-button:hover {
  background-color: #4b5563;
}

.preview-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3);
}

/* Crop button */
.crop-button {
  flex: 1;
  padding: 8px 12px;
  background-color: #6b7280;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.875rem;
}

.crop-button:hover {
  background-color: #4b5563;
}

.crop-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3);
}

/* View original button */
.view-button {
  padding: 8px 16px;
  background-color: #e5e7eb;
  color: #4b5563;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.view-button:hover {
  background-color: #d1d5db;
  color: #1f2937;
}

.view-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3);
}

/* Desktop and mobile responsive styles */
@media (max-width: 768px) {
  .thumbnail-info {
    padding: 12px;
  }
  
  .thumbnail-header {
    margin-bottom: 10px;
  }
  
  .thumbnail-title {
    font-size: 0.9rem;
    min-width: 100px;
  }
  
  .thumbnail-resolution {
    font-size: 0.8rem;
  }
  
  .thumbnail-buttons {
    gap: 4px;
    flex-direction: row;
  }
  
  .thumbnail-format-selector {
    min-width: 50px;
    font-size: 0.7rem;
    padding: 4px 6px;
  }
  
  .download-button, .view-button, .preview-button, .crop-button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

/* Special handling for very small screens */
@media (max-width: 340px) {
  .thumbnail-buttons {
    flex-direction: column;
  }
  
  .download-button, .view-button, .preview-button, .crop-button {
    width: 100%;
  }
}

/* Dark mode */
.dark {
  color-scheme: dark;
}

.dark body {
  background-color: #111827;
  color: #e2e8f0;
}

/* Dark mode thumbnail styles */
.dark .thumbnail-container {
  background-color: #1f2937;
  border-color: #374151;
}

.dark .thumbnail-container:hover {
  border-color: #4b5563;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.dark .thumbnail-info {
  border-top-color: #374151;
}

.dark .thumbnail-title {
  color: #f3f4f6;
}

.dark .thumbnail-resolution {
  color: #9ca3af;
}

.dark .download-button {
  background-color: #ef4444;
}

.dark .download-button:hover {
  background-color: #dc2626;
}

.dark .download-button:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.dark .preview-button {
  background-color: #6b7280;
}

.dark .preview-button:hover {
  background-color: #4b5563;
}

.dark .preview-button:focus {
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
}

.dark .crop-button {
  background-color: #6b7280;
}

.dark .crop-button:hover {
  background-color: #4b5563;
}

.dark .crop-button:focus {
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
}

/* Enhanced dark mode styling */
.dark .shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.dark .shadow-xl {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Smooth transitions for dark/light mode */
body, header, footer, .bg-white, .bg-gray-50, .text-gray-900, .text-gray-700, .text-gray-600, .text-gray-500, .text-gray-400, .border-gray-200 {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Loading animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
}

.dark .view-button {
  background-color: #374151;
  color: #d1d5db;
}

.dark .view-button:hover {
  background-color: #4b5563;
  color: #f9fafb;
}

.dark .view-button:focus {
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.3);
} 