/*!
 * Lenso Layouts — стили раскладок окна
 */
:where(.lenso) {
  --lenso-side: 340px;            /* ширина боковой панели с подписью */
  --lenso-thumbs-col: 104px;      /* ширина колонки миниатюр слева/справа */
  --lenso-side-bg: rgba(255, 255, 255, 0.03);
  --lenso-side-line: rgba(255, 255, 255, 0.08);
  --lenso-overlay-bg: rgba(0, 0, 0, 0.55);
  --lenso-caption-lines: 3;
}
.lenso--light { --lenso-side-bg: rgba(0, 0, 0, 0.02); --lenso-side-line: rgba(0, 0, 0, 0.08); }

/* ---------- Подпись сбоку ---------- */
.lenso--cap-side .lenso__footer {
  min-height: 0 !important;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
  padding: 28px 24px;
  overflow-y: auto;
  background: var(--lenso-side-bg);
  border-inline-start: 1px solid var(--lenso-side-line);
}
.lenso--cap-side .lenso__caption {
  max-width: none;
  text-align: start;
  font-size: 15px;
  line-height: 1.6;
  color: var(--lenso-color);
}

/* ---------- Подпись сверху ---------- */
.lenso--cap-top .lenso__footer { padding: 2px 20px 10px; }

/* ---------- Подпись поверх фото ---------- */
.lenso--cap-overlay .lenso__footer {
  z-index: 3;
  align-self: end;
  justify-self: center;
  min-height: 0 !important;
  max-width: min(var(--lenso-caption-max), calc(100% - (var(--lenso-nav-size) + var(--lenso-nav-offset) * 2) * 2));
  margin-bottom: calc(var(--lenso-gap) + 12px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--lenso-overlay-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lenso--cap-overlay .lenso__caption { color: #fff; }

/* ---------- Миниатюры слева / справа ---------- */
.lenso--th-left .lenso__thumbs,
.lenso--th-right .lenso__thumbs {
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px;
}

/* ---------- «Подробнее» ---------- */
.lenso.has-more .lenso__caption:not(.is-expanded) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lenso-caption-lines);
  line-clamp: var(--lenso-caption-lines);
  overflow: hidden;
}
.lenso__more {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lenso-accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.lenso__more:hover { text-decoration: underline; text-underline-offset: 3px; }
/* место под кнопку зарезервировано всегда — высота панели не прыгает */
.lenso.has-more:not(.lenso--cap-side) .lenso__more { flex-basis: 100%; }
.lenso__more[hidden] { display: block; visibility: hidden; }
