/* Публичная пользовательская страница (/{slug}). */

.custom-page {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 0px 56px;
    box-sizing: border-box;
}

.custom-page-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.custom-page-card {
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.custom-page-title {
    margin: 0 0 16px;
    color: var(--text-bright);
    font-size: 26px;
    text-align:center;
}

.custom-page-content {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
}

.custom-page-content h1,
.custom-page-content h2,
.custom-page-content h3 { color: var(--text-bright); margin: 20px 0 8px; }
/* .custom-page-content p { margin: 0 0 12px; } */
/* Ссылки описаны одним правилом на весь сайт в main.css (стиль взят отсюда). */
.custom-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}
/* Картинки в теле страницы кликабельны — открываются в лайтбоксе. */
.custom-page-content img.cp-img-zoomable { cursor: zoom-in; }

/* Лайтбокс: полноэкранный просмотр картинки. Разметку создаёт custom_page.js. */
.cp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.9);
    animation: cp-lightbox-in 0.15s ease;
}
@keyframes cp-lightbox-in { from { opacity: 0; } to { opacity: 1; } }
.cp-lightbox-img {
    max-width: 96vw;
    max-height: 92vh;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    cursor: zoom-out;
}
.cp-lightbox-close {
    position: fixed;
    top: 14px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}
.cp-lightbox-close:hover { opacity: 1; }
body.cp-modal-open { overflow: hidden; }

/* Перелистывание при нескольких картинках. */
.cp-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 64px;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
    user-select: none;
}
.cp-lightbox-nav:hover { opacity: 1; background: rgba(0, 0, 0, 0.6); }
.cp-lightbox-prev { left: 16px; }
.cp-lightbox-next { right: 16px; }
.cp-lightbox-counter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.5px;
}
@media (max-width: 600px) {
    .cp-lightbox-nav { width: 40px; height: 52px; font-size: 30px; }
    .cp-lightbox-prev { left: 6px; }
    .cp-lightbox-next { right: 6px; }
}
.custom-page-content ul,
.custom-page-content ol { padding-left: 24px; margin: 0 0 12px; }
.custom-page-content blockquote {
    margin: 0 0 12px;
    padding: 6px 14px;
    border-left: 3px solid var(--border-hover);
    color: var(--text-secondary);
}
/* Quill хранит каждую строку цитаты отдельным <blockquote>. Соседние
   склеиваем в один блок — убираем отступ и двойной padding между ними. */
.custom-page-content blockquote:has(+ blockquote) {
    margin-bottom: 0;
    padding-bottom: 0;
}
.custom-page-content blockquote + blockquote {
    padding-top: 0;
}
.custom-page-content pre {
    background: var(--bg-inner);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    /* font-size: 13px; */
    text-wrap: wrap;
}
