/* style.css */

.verleih-column {
  max-width: 130px;
}

.spielmaterial-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spielmaterial-item .price {
  position: absolute;
  right: -5px;
  bottom: -5px;
  padding: 0 6px;
  background-color: #ffb74b;
  font-weight: 400;
  font-size: 16px;
  z-index: 99;
}

.spielmaterial-item h3 {
  text-align: center;
  display: inline-block;
  min-height: 4em;
  width: 100%;
  margin-bottom: 0;
  hyphens: auto;
  word-break: break-word;
  overflow-wrap: break-word;
  font-size: 18px;
  padding-top: 10px;
}

.spielmaterial-img {
  width: 150px;
  height: 150px;
  /* overflow: hidden; */
  position: relative;
}

.spielmaterial-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 15px;
  border: 10px solid white;
}

.spielmaterial-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 15px;
  border: 10px solid white;
}

.spielmaterial-details-button {
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
}

.spielmaterial-details-button:hover {
}

/* MODAL: robust fullscreen + zentriert */
.spielmaterial-modal {
  position: fixed;
  inset: 0;
  z-index: 100000000000;
  width: auto;
  height: auto;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Optional: Hintergrund-Scroll sperren (passt zum JS body.modal-open) */
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0);
}

.spielmaterial-modal-content {
  background: #fff;
  padding: 40px 20px 20px 20px;
  border-radius: 12px;
  position: relative;
  max-width: 520px;
  width: min(90vw, 520px);
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.spielmaterial-modal-content-inner {
  max-height: calc(85vh - 60px);
  overflow: auto;
  padding-right: 6px;
}

.spielmaterial-modal-content img,
.spielmaterial-modal-content video {
  width: 100%;
  max-width: 360px;
  display: block;
  margin: 0 auto 15px auto;
  border-radius: 12px;
}

.spielmaterial-modal-content h3 {
  font-size: 32px;
}

.spielmaterial-modal-close {
  position: absolute;
  right: 16px;
  top: 8px;
  font-size: 1.6em;
  cursor: pointer;
  color: #888;
  background: transparent;
  border: 0;
  line-height: 1;
  box-shadow: none;
  padding: 0;
}

.spielmaterial-modal-close:hover {
  color: #000;
}

.spielmaterial-galerie
  .wp-block-column:nth-child(odd)
  .spielmaterial-item:nth-child(odd)
  .spielmaterial-img
  img,
.spielmaterial-galerie
  .wp-block-column:nth-child(odd)
  .spielmaterial-item:nth-child(odd)
  .spielmaterial-img
  video {
  transform: rotate(-2deg);
}

.spielmaterial-galerie
  .wp-block-column:nth-child(odd)
  .spielmaterial-item:nth-child(even)
  .spielmaterial-img
  img,
.spielmaterial-galerie
  .wp-block-column:nth-child(odd)
  .spielmaterial-item:nth-child(even)
  .spielmaterial-img
  video {
  transform: rotate(2deg);
}

.spielmaterial-galerie
  .wp-block-column:nth-child(even)
  .spielmaterial-item:nth-child(odd)
  .spielmaterial-img
  img,
.spielmaterial-galerie
  .wp-block-column:nth-child(even)
  .spielmaterial-item:nth-child(odd)
  .spielmaterial-img
  video {
  transform: rotate(2deg);
}

.spielmaterial-galerie
  .wp-block-column:nth-child(even)
  .spielmaterial-item:nth-child(even)
  .spielmaterial-img
  img,
.spielmaterial-galerie
  .wp-block-column:nth-child(even)
  .spielmaterial-item:nth-child(even)
  .spielmaterial-img
  video {
  transform: rotate(-2deg);
}

.spielmaterial-galerie {
  justify-content: center;
}