/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Removed - using Bootstrap utilities with theme colors in navbar instead */

.form-label {
  text-transform: none !important;
}

/* Disable upload button until file input is valid */
.image-upload-form:has(input[type='file']:invalid) .submit-btn {
  opacity: 0.5;
  pointer-events: none;
}

/* Enable once file is selected */
.image-upload-form:has(input[type='file']:valid) .submit-btn {
  opacity: 1;
  pointer-events: auto;
}

/* Carousel styling improvements using Bootstrap utilities where possible */

/* Ensure carousel controls are properly styled and accessible */
.carousel-control-prev,
.carousel-control-next {
  width: 3rem;
  height: 3rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  opacity: 0.8;
  transition: opacity 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.2);
}

.carousel-control-prev {
  left: 1rem;
}

.carousel-control-next {
  right: 1rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
  width: 1.5rem;
  height: 1.5rem;
}

/* Fixed carousel height - doesn't change based on image size */
.carousel-inner {
  height: 500px;
  display: flex;
  align-items: center;
}

/* Container for images - fixed height */
.carousel-image-container {
  width: 100%;
  height: 100%;
  max-height: 450px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Images fit within fixed container */
.carousel-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Fixed height for carousel items */
.carousel-item {
  height: 500px;
}

/* Ensure carousel item content is properly contained */
.carousel-item > div {
  width: 100%;
  height: 100%;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 576px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 2.5rem;
    height: 2.5rem;
  }

  .carousel-control-prev {
    left: 0.5rem;
  }

  .carousel-control-next {
    right: 0.5rem;
  }

  .carousel-inner {
    height: 350px;
  }

  .carousel-image-container {
    max-height: 300px;
  }

  .carousel-item {
    height: 350px;
  }
}

.details-list dd {
  margin-left: 1rem !important; /* adjust to taste */
}

.var-symbol {
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: normal;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-block;
}

.var-symbol sub,
.var-symbol sup {
  font-size: 0.75em;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: normal;
}

.sop-unit {
  padding: 0.25rem 0.5rem; /* match form-control-sm */
  font-size: 0.875rem; /* same as small input */
  line-height: 1.2; /* removes excess height */
  height: auto; /* prevent Bootstrap forcing height */
  display: flex;
  align-items: center; /* vertical centering */
}

/* ============================================================
   IMAGE GRID STYLING
   ============================================================ */

.image-grid-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  cursor: pointer;
}

.image-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.image-grid-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.image-grid-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.image-grid-card:hover .image-grid-image {
  transform: scale(1.05);
}

/* Responsive grid image heights */
@media (max-width: 768px) {
  .image-grid-container {
    height: 150px;
  }
}

@media (min-width: 992px) {
  .image-grid-container {
    height: 220px;
  }
}

/* MOBILE BEHAVIOR */
