.message-view > header {
    align-items: center;
    gap: 18px;
}

.message-header-copy {
    display: grid;
    flex: 1 1 auto;
    gap: 12px;
    min-width: 0;
}

.message-header-sender {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-header-avatar {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 4px;
    background: #e9f6fc;
    color: #0088cc;
    font-size: 20px;
}

.message-header-sender > div {
    display: grid;
    min-width: 0;
}

.message-header-sender small,
.message-header-subject small {
    color: #7b8794;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    line-height: 1.3;
    text-transform: uppercase;
}

.message-header-sender strong {
    color: #33353f;
    font-size: 13px;
    line-height: 1.4;
}

.message-header-sender span {
    overflow: hidden;
    color: #77838f;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-header-subject {
    padding-top: 10px;
    border-top: 1px solid #e5e8eb;
}

.message-header-subject h2 {
    margin: 2px 0 0;
    color: #33353f;
    font-size: 18px;
    line-height: 1.35;
}

.message-primary-content {
    padding: 18px 20px 20px;
    border-bottom: 1px solid #ddd;
    background: #fff;
}

.message-primary-content small {
    display: block;
    margin-bottom: 7px;
    color: #7b8794;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.message-primary-content p {
    margin: 0;
    color: #444;
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message-primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #edf0f2;
}

.message-primary-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.message-primary-actions .button.secondary {
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
}

.message-primary-actions .button.secondary:hover {
    border-color: #0088cc;
    color: #0088cc;
}

.message-view .reply-form.is-collapsed {
    display: none;
}

.message-replies-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -4px 0 14px;
    color: #7b8794;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.message-replies-title i {
    color: #0088cc;
    font-size: 16px;
}

@media (max-width: 767px) {
    .message-view > header {
        align-items: stretch;
        flex-direction: column;
    }

    .message-header-subject h2 {
        font-size: 16px;
    }

    .message-primary-actions .button {
        justify-content: center;
        flex: 1 1 auto;
    }
}
