html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Badge/Pill Contrast Fixes - ensure dark backgrounds have light text */
.badge.bg-primary,
.badge.bg-secondary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-info,
.badge.bg-dark {
  color: #fff !important;
}

.badge.bg-warning,
.badge.bg-light {
  color: #000 !important;
}

/* Device Image Carousel Styles */
.device-images-section {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 1rem;
}

.device-image-container {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.375rem;
}

.device-carousel-image {
  max-height: 300px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: transform 0.2s ease;
}

.device-carousel-image:hover {
  transform: scale(1.02);
}

.image-label {
  font-size: 0.875rem;
}

.damage-list {
  font-size: 0.75rem;
}

/* Carousel indicators positioning */
#deviceImageCarousel .carousel-indicators {
  position: relative;
  bottom: 0;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

#deviceImageCarousel .carousel-indicators button {
  background-color: #6c757d;
  border-radius: 50%;
  width: 10px;
  height: 10px;
}

#deviceImageCarousel .carousel-indicators button.active {
  background-color: #0d6efd;
}

/* Carousel controls */
#deviceImageCarousel .carousel-control-prev,
#deviceImageCarousel .carousel-control-next {
  width: 10%;
  opacity: 0.5;
}

#deviceImageCarousel .carousel-control-prev:hover,
#deviceImageCarousel .carousel-control-next:hover {
  opacity: 0.9;
}

#deviceImageCarousel .carousel-control-prev-icon,
#deviceImageCarousel .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  padding: 1.5rem;
}

/* Thumbnail strip */
.device-image-thumbnails {
  max-width: 100%;
  overflow-x: auto;
}

.device-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.6;
}

.device-thumbnail:hover {
  opacity: 1;
}

.device-thumbnail.active {
  border-color: #0d6efd;
  opacity: 1;
}

/* Lightbox modal */
#imageLightboxModal .lightbox-image {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
}

#imageLightboxModal .modal-body {
  background-color: #000;
}

#imageLightboxModal .modal-content {
  border: none;
}

/* Validation summary: render errors as plain lines inside the alert box,
   not a bulleted list with a trailing margin. */
.validation-summary-errors ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.validation-summary-errors ul li + li {
  margin-top: 0.25rem;
}