/**
 * Content AI Suite – Writer inline images (float, size) + Lightbox
 * Für Content mit .cas-img-link / .cas-img (Marker [[IMAGE_N: links/rechts]]).
 */

.cas-img-link {
  text-decoration: none;
}

.cas-img {
  display: block;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.cas-img-left {
  float: left;
  margin: 0.2em 1em 0.8em 0;
  width: 22%;
  max-width: 220px;
}

.cas-img-right {
  float: right;
  margin: 0.2em 0 0.8em 1em;
  width: 22%;
  max-width: 220px;
}

@media (max-width: 700px) {
  .cas-img-left,
  .cas-img-right {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1em 0;
  }
}

/* --- Lightbox --- */
.cas-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}

.cas-lightbox.is-open {
  display: block;
}

.cas-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.cas-lightbox-dialog {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  margin: 6vh auto 0 auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cas-lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.cas-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  line-height: 38px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  background: #fff;
  color: #1d2327;
}

.cas-lightbox-close:hover {
  background: #f0f0f1;
}
