/**
 * Omevi Photo Albums - Public Styles
 */

/* Layout */
.album-page-container,
.album-details-page {
  max-width: 100%;
}

.album-row {
  display: flex;
}

/* Sidebar */
.filter-sidebar {
  background: white;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  font-size: 14px;
  height: 100%;
  width: 375px;
  flex-shrink: 0;
}

.filter-sidebar-public {
  padding: 30px !important;
}

.filter-sidebar-public h4 {
  margin-top: 0;
  margin-bottom: 20px;
}

/* Album details sidebar */
.album-details h3 {
  margin: 25px 0 10px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid #d5d5d5;
}

.album-details p {
  margin-bottom: 10px !important;
}

.album-details .video-link {
  color: #0073aa;
  text-decoration: none;
  display: inline-block;
  padding: 5px 0;
}

.album-details .video-link:hover {
  color: #005177;
  text-decoration: underline;
}

/* Gallery container */
.dynamic-gallery {
  display: block;
  box-sizing: border-box;
  width: 100%;
}

.albums-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding-left: 30px;
}

/* Album box */
.album-box {
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  overflow: hidden;
  text-align: center;
  padding: 0;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 300px;
  position: relative;
}

.album-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.album-box img {
  width: 100%;
  height: 300px;
  display: block;
  object-fit: cover;
}

.album-box h3 {
  font-size: 16px;
  padding: 15px 0 5px;
  margin: 5px 15px 0;
  text-align: left;
  border-bottom: 1px solid #d5d5d5;
}

.album-box p {
  text-align: left;
  margin: 5px 15px;
}

/* Album item (clickable area) */
.album-item {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Hover text overlay */
.album-box-hover-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 22px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.album-box:hover .album-box-hover-text {
  opacity: 1;
}

/* Loading spinner */
#loading_spinner {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

/* No match message */
.no-match-container {
  flex: 0 1 calc(100% - 15px);
  text-align: center;
  padding: 50px 20px;
}

/* Lazy loading */
.omevi-lazy-image {
  transition: opacity 0.3s ease;
}

.omevi-lazy-image.loading {
  opacity: 0.5;
}

.omevi-lazy-image.loaded {
  opacity: 1;
}

/* Lightbox adjustments */
#lightboxOverlay {
  z-index: 10020;
}

#lightbox {
  z-index: 10022;
}

/* Video section */
.album-video {
  margin-top: 30px;
  padding: 20px;
  background: #f9f9f9;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.album-video h3 {
  margin-top: 0;
}

.album-video iframe {
  max-width: 100%;
}

/* Form styling */
.form-group {
  margin-bottom: 15px;
}

/* Checkbox group - wrapped layout */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.form-check {
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.form-check-input {
  margin-right: 4px;
  margin-top: 0;
}

.form-check-label {
  font-size: 12px;
  cursor: pointer;
  line-height: 1.2;
}

/* Responsive - Desktop */
@media (min-width: 768px) {
  #additional_filters {
    display: block;
  }
}

@media (min-width: 1700px) {
  .albums-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media only screen and (min-width: 1300px) and (max-width: 1699px) {
  .albums-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media only screen and (min-width: 768px) and (max-width: 1299px) {
  .albums-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive - Mobile */
@media only screen and (max-width: 767px) {
  #additional_filters {
    display: none;
  }

  .filter-sidebar-public {
    padding: 20px !important;
    margin-bottom: 20px;
  }

  .album-row {
    flex-direction: column;
  }

  .filter-sidebar {
    width: 100%;
  }

  .albums-container {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .album-box img {
    height: 250px;
  }

  .album-box {
    height: 250px;
  }
}

/* Print styles */
@media print {
  .filter-sidebar {
    display: none;
  }

  .albums-container {
    padding: 0;
  }

  .album-box {
    page-break-inside: avoid;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .album-box,
  .album-box-hover-text,
  .omevi-lazy-image {
    transition: none;
  }

  .album-box:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .album-box {
    border: 2px solid #000;
  }

  .filter-sidebar {
    border-right: 2px solid #000;
  }
}
