.cloudalbums-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
  transition: opacity 0.15s ease;
}

/* Tijdens een dynamische (AJAX) navigatie-overgang */
.cloudalbums-wrapper.cloudalbums-loading {
  opacity: 0.4;
  pointer-events: none;
}

.cloudalbums-album-card {
  display: inline-block;
  width: 240px;
  cursor: pointer;
  text-align: center;
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}

.cloudalbums-album-card:hover {
  transform: scale(1.02);
}

.cloudalbums-album-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.cloudalbums-album-title {
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}
.pswp-gallery {
  column-count: 3;
  column-gap: 10px;
  display: block;
  width: 100%; /* force own row inside the flex .cloudalbums-wrapper parent */
}

.pswp-gallery a.cloudalbums-item {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  break-inside: avoid;
  border-radius: 6px;
  overflow: hidden;
}

.pswp-gallery a.cloudalbums-item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .pswp-gallery { column-count: 2; }
}

@media (max-width: 500px) {
  .pswp-gallery { column-count: 1; }
}

.cloudalbums-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Album grid */
.cloudalbums-album-link {
    width: 120px;
    display: block;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.cloudalbums-album-link:hover {
    text-decoration: none;
    color: inherit;
}

.cloudalbums-album-icon {
    font-size: 48px;
    color: #555;
}

/* Real photo used as an album cover (Album covers setting) */
.cloudalbums-album-cover {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.cloudalbums-album-name {
    font-size: 12px;
    word-break: break-word;
}

.cloudalbums-thumb {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* "Load more" button shown when an album has more images than the initial batch */
.cloudalbums-load-more {
    display: block;
    width: 100%; /* force own row inside the flex .cloudalbums-wrapper parent */
    margin: 16px auto 0;
}

/* Test mode banner */
.cloudalbums-test-mode-notice {
    width: 100%;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin: 0 0 10px;
}

.cloudalbums-close {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

/* CloudAlbums – duidelijke close knop */
.pswp__button--close.cloudalbums-close {
  background: #ffffff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;              /* iets van de rand af */
}

/* SVG container */
.pswp__button--close.cloudalbums-close .pswp__icn {
  width: 24px;
  height: 24px;
}

/* De X zelf: zwart + bold */
.pswp__button--close.cloudalbums-close #pswp__icn-close {
  fill: #000000;
}

/* Shadow van PhotoSwipe uitzetten (maakt 'm cleaner) */
.pswp__button--close.cloudalbums-close .pswp__icn-shadow {
  display: none;
}

/* Hover effect */
.pswp__button--close.cloudalbums-close:hover {
  background: #f2f2f2;
  transform: scale(1.08);
}

/* Focus (keyboard toegankelijkheid) */
.pswp__button--close.cloudalbums-close:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.25);
}

/* Touch devices: groter tappable area voor alle lightbox-knoppen */
@media (pointer: coarse) {
  .pswp__button--close.cloudalbums-close {
    width: 48px;
    height: 48px;
  }

  .pswp__button--download.cloudalbums-download,
  .cloudalbums-autoplay {
    min-width: 44px;
    min-height: 44px;
  }

  .cloudalbums-nav {
    width: 44px;
    height: 44px;
  }

  .cloudalbums-nav--next {
    left: 68px;
  }

  .cloudalbums-load-more {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 16px;
  }

  .cloudalbums-album-link {
    min-height: 44px;
  }
}

/* Fototeller */
.pswp__counter.cloudalbums-counter {
  color: #fff;
  font-size: 14px;
  padding: 0 10px;
  align-self: center;
}

/* Verberg een eventuele ingebouwde teller, zodat er nooit twee naast elkaar staan */
.pswp__counter:not(.cloudalbums-counter) {
  display: none;
}

/* Downloadknop */
.pswp__button--download.cloudalbums-download {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}

/* Diavoorstelling-knop */
.cloudalbums-autoplay {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* Bijschrift onder de foto */
.cloudalbums-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

/* --- Rustiger, minimalistischer lightbox-uiterlijk --- */

/* Bestandsnaam links in de bovenbalk, kort en subtiel */
.cloudalbums-caption-bar {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 0 4px 0 12px;
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50vw;
  align-self: center;
}

/* Bovenbalk zelf: iets lager, iets transparanter, rustiger */
.pswp__top-bar {
  background: rgba(0,0,0,0.45);
  height: 44px;
}

/* Standaard PhotoSwipe-pijlen aan weerszijden van het scherm verbergen */
.pswp__button--arrow {
  display: none !important;
}

/* Eigen compacte pijltjes linksonder, samen, zoals een bestandsviewer */
.cloudalbums-nav {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.cloudalbums-nav:hover {
  opacity: 1;
}

.cloudalbums-nav--prev {
  left: 16px;
}

.cloudalbums-nav--next {
  left: 58px; /* naast elkaar, zoals de GNOME-viewer */
}

/* Overige knoppen in de bovenbalk iets subtieler, minder "druk" */
.pswp__button--zoom,
.cloudalbums-counter,
.cloudalbums-download,
.cloudalbums-autoplay,
.cloudalbums-close {
  opacity: 0.85;
}
.pswp__button--zoom:hover,
.cloudalbums-download:hover,
.cloudalbums-autoplay:hover,
.cloudalbums-close:hover {
  opacity: 1;
}
