/* === Условные обозначения (usl) === */

.main-content:has(.usl-page) { padding-top: 0; }

.usl-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 60px;
  width: 100%;
}

.usl-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  padding: 10px;
}
.usl-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: border-color 0.15s, transform 0.1s;
}
.usl-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.usl-item__img {
  width: 100%;
  height: 80px;
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.usl-item__img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.usl-item__text {
  font-size: 11px;
  line-height: 1.35;
  color: var(--color-on-surface-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.usl-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px;
  animation: usl-fade-in 0.15s ease-out;
}
@keyframes usl-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.usl-lightbox__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  max-width: min(900px, 90vw);
  max-height: 90vh;
}
.usl-lightbox__img {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 70vh;
  overflow: hidden;
}
.usl-lightbox__img img {
  max-width: 100%;
  max-height: calc(70vh - 48px);
  object-fit: contain;
}
.usl-lightbox__caption {
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  max-width: 700px;
}
.usl-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}
.usl-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

