@tailwind base;
@tailwind components;
@tailwind utilities;

/* Dark Gray Theme Setup */
body {
  @apply bg-gray-800 text-gray-300;
}

/* Textarea Styles */
textarea#prompt {
  @apply w-full p-4 bg-gray-700 border border-gray-600 text-gray-300 placeholder-gray-500 rounded-lg shadow-md focus:outline-none focus:ring-2 focus:ring-gray-500 focus:border-transparent resize-none;
}

.loader {
  border-top-color: #3498db;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#spinner.hidden {
  display: none;
}

#spinner-container {
  position: relative; /* Ensure it stays within the container */
  width: 100%; /* Full width of the container */
  height: 100%; /* Full height of the container */
}

#spinner {
  position: absolute; /* Overlay the spinner */
  top: 50%; /* Center vertically */
  left: 50%; /* Default for mobile screens */
  transform: translate(-50%, -50%); /* Adjust for the spinner's size */
}

@media (min-width: 768px) {
  #spinner {
    left: 73%; /* Adjust for desktop screens */
  }
}

#spinner .loader {
  pointer-events: auto; /* Allow interaction with the spinner itself if needed */
}

/* Button Styles */
button#generateButton {
  @apply bg-gray-600 hover:bg-gray-500 text-gray-300 font-semibold py-2 px-6 rounded-lg shadow-md transition-colors duration-300 focus:outline-none focus:ring-2 focus:ring-gray-500 float-right;
}

/* Image Container Styles */
#imagesContainer img {
  @apply rounded-lg shadow-lg w-full transition-opacity duration-500 ease-in-out opacity-75;
  object-fit: cover;
  cursor: pointer;
}

#imagesContainer {
  min-height: 474px;
}
@media (min-width: 1024px) {
  #imagesContainer {
    overflow-y: hidden;
  }
}

/* Filters Container Styles */
#filtersContainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  scrollbar-width: none;
}

/* Filter Item Styles */
.filter-item {
  background-color: #2d2d2d;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
  cursor: pointer;
  max-width: 83px;
  margin: 10px;
}

.filter-item:hover {
  transform: scale(1.05);
}

.filter-thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 5px;
}

.filter-title {
  font-size: 12px;
  font-weight: bold;
  margin: 5px 0;
}

.filter-description {
  font-size: 10px;
  color: #b0b0b0;
  opacity: 0;
  transition: opacity 0.3s;
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
}

.filter-item:hover .filter-description {
  opacity: 1;
}

/* Active Filter Styles */
.filter-item.active {
  border: 2px solid #FFF;
  background-color: #AAA;
}

.alert-box {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #f44336; /* Red background */
  color: #333 !important;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  
}

.close-button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  margin-left: 10px;
}

.viewer-prev, .viewer-next {
  display: none;
}