/* Сворачивание длинных сообщений */

.postcontent.is-collapsible {
    position: relative;
    overflow: hidden;
    max-height: var(--post-collapse-height, 300px);
}

.postcontent.is-collapsible::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
    pointer-events: none;
}

.postcontent.is-collapsible.is-expanded {
    max-height: none;
}

.postcontent.is-collapsible.is-expanded::after {
    display: none;
}

/* кнопка под сообщением */
.postcollapse-toggle {
    display: block;
    margin: 6px 0 12px;
    padding: 4px 12px;
    border: 1px solid #ced1d1;
    border-radius: 3px;
    background: #f7f7f7;
    color: #373737;
    font-size: 13px;
    cursor: pointer;
}

.postcollapse-toggle:hover,
.postcollapse-toggle:focus {
    background: #eeeeee;
}

/* панель «развернуть все» над лентой сообщений */
.postcollapse-toolbar {
    margin: 0 0 10px;
    text-align: right;
}

.postcollapse-toolbar button {
    margin-left: 6px;
    padding: 3px 10px;
    border: 1px solid #ced1d1;
    border-radius: 3px;
    background: #f7f7f7;
    color: #373737;
    font-size: 12px;
    cursor: pointer;
}

.postcollapse-toolbar button:hover,
.postcollapse-toolbar button:focus {
    background: #eeeeee;
}

/* пункт админского меню: длинная подпись должна переноситься, а не вылезать */
.postadminlist .postcollapse-admin {
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
    font-size: 12px;
    padding: 4px 6px;
}

@media print {
    .postcontent.is-collapsible {
        max-height: none;
        overflow: visible;
    }

    .postcontent.is-collapsible::after,
    .postcollapse-toggle,
    .postcollapse-toolbar {
        display: none !important;
    }
}
