/* Стили для профиля */
.profile-avatar-container {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.profile-avatar-container:hover {
    transform: scale(1.05);
}

.profile-avatar-container .avatar-placeholder,
.profile-avatar-container img {
    /* width: 60px !important; */
    /* height: 60px !important; */
    border-radius: 50%;
}

.profile-avatar-container .avatar-placeholder {
    font-size: 200% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-info-section {
   background: #f8f9fa; 
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease-out;
}

.section-title {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.section-title i {
    color: #007bff;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
    min-width: 140px;
}

.info-value {
    text-align: right;
    color: #6c757d;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.profile-actions {
    text-align: center;
}

.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.action-buttons .btn {
    min-width: 140px;
}

/* Аватар профиля: редактирование через hover вместо отдельной кнопки */
#profileAvatar .qchat-profile-avatar-edit-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    vertical-align: middle;
}

#profileAvatar .qchat-profile-avatar-edit-wrap .profile-avatar,
#profileAvatar .qchat-profile-avatar-edit-wrap .avatar-placeholder {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    border-radius: 50% !important;
    margin: 0 !important;
    align-self: auto !important;
    object-fit: cover;
}

#profileAvatar .qchat-profile-avatar-edit-wrap .avatar-placeholder {
    font-size: 42px !important;
}

#profileAvatar .qchat-profile-avatar-edit {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 10px 10px;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .18));
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .16s ease, transform .16s ease;
    cursor: pointer;
    /* The status-dot rules intentionally keep the avatar wrapper overflow visible.
       While this control is translated below the avatar, it can otherwise sit on
       top of the username and make the wrapper :hover state flicker. */
    pointer-events: none;
}

#profileAvatar .qchat-profile-avatar-edit-wrap:hover .qchat-profile-avatar-edit,
#profileAvatar .qchat-profile-avatar-edit:focus-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#profileAvatar .qchat-profile-avatar-edit i {
    font-size: .86rem;
}

/* qchat v80: keep the classic audio player compact inside Profile Blog too.
   Blog renderers may set width/max-width:100% !important on .audio_card;
   cap the blog audio lane wrappers so the inline 100% resolves to 300px. */
:root {
    --qchat-classic-audio-max-width: 300px;
}

.profile-blog-post .profile-blog-attachments:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-file-bundle-message:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-file-bundle-groups:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-audio-group:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-audio-list:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-audio-attachment:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-attachment-preview:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .qchat-file-bundle-group-audio:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .qchat-file-bundle-list-audio:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .qchat-file-bundle-item-audio:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .qchat-file-bundle-preview-item:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .qchat-file-bundle-item:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-attachment:has(.audio_card.qchat-audio-classic-card),
.profile-blog-post .profile-blog-file-list:has(.audio_card.qchat-audio-classic-card) {
    width: min(var(--qchat-classic-audio-max-width), 100%) !important;
    max-width: var(--qchat-classic-audio-max-width) !important;
    min-width: 0 !important;
    flex: 0 1 var(--qchat-classic-audio-max-width) !important;
    flex-basis: var(--qchat-classic-audio-max-width) !important;
    justify-self: start !important;
    align-self: flex-start !important;
    box-sizing: border-box !important;
}

.profile-blog-post .audio_card.qchat-audio-classic-card,
.profile-blog-post .qchat-audio-classic-card,
.profile-blog-post .audio_card.qchat-audio-classic-card .current-song,
.profile-blog-post .audio_card.qchat-audio-classic-card .qchat-audio-classic-player,
.profile-blog-post .qchat-audio-classic-player,
.profile-blog-post .blog-audio-current.qchat-audio-classic-player,
.profile-blog-audio-section .audio_card.qchat-audio-classic-card,
.profile-blog-audio-section .qchat-audio-classic-player,
.profile-blog-attachment-preview .audio_card.qchat-audio-classic-card,
.profile-blog-attachment-preview .qchat-audio-classic-player {
    width: min(var(--qchat-classic-audio-max-width), 100%) !important;
    max-width: var(--qchat-classic-audio-max-width) !important;
    min-width: 0 !important;
    flex: 0 1 var(--qchat-classic-audio-max-width) !important;
    flex-basis: var(--qchat-classic-audio-max-width) !important;
    justify-self: start !important;
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.profile-blog-post .audio_card.qchat-audio-classic-card .song-name,
.profile-blog-post .audio_card.qchat-audio-classic-card .song-autor,
.profile-blog-post .qchat-audio-classic-player .song-name,
.profile-blog-post .qchat-audio-classic-player .song-autor,
.profile-blog-audio-section .qchat-audio-classic-player .song-name,
.profile-blog-audio-section .qchat-audio-classic-player .song-autor {
    max-width: calc(var(--qchat-classic-audio-max-width) - 24px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

@media (max-width: 300px) {
    .profile-blog-post .profile-blog-attachments:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-file-bundle-message:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-file-bundle-groups:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-audio-group:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-audio-list:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-audio-attachment:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-attachment-preview:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .qchat-file-bundle-group-audio:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .qchat-file-bundle-list-audio:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .qchat-file-bundle-item-audio:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .qchat-file-bundle-preview-item:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .qchat-file-bundle-item:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-attachment:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .profile-blog-file-list:has(.audio_card.qchat-audio-classic-card),
    .profile-blog-post .audio_card.qchat-audio-classic-card,
    .profile-blog-post .qchat-audio-classic-card,
    .profile-blog-post .audio_card.qchat-audio-classic-card .current-song,
    .profile-blog-post .audio_card.qchat-audio-classic-card .qchat-audio-classic-player,
    .profile-blog-post .qchat-audio-classic-player,
    .profile-blog-post .blog-audio-current.qchat-audio-classic-player,
    .profile-blog-audio-section .audio_card.qchat-audio-classic-card,
    .profile-blog-audio-section .qchat-audio-classic-player,
    .profile-blog-attachment-preview .audio_card.qchat-audio-classic-card,
    .profile-blog-attachment-preview .qchat-audio-classic-player {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
    }
}


/* qchat v81: saved blog cards with the classic audio player must not inherit
   the wide audio/blog lane. The renderer writes inline width using
   --qchat-saved-blog-lane-width on the message row, so override that variable
   for classic-player saved-blog cards and keep only the player capped at 300px. */
html body #messagesContainer .message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card),
html body #messagesContainer .message:has(.saved-profile-blog-post .qchat-audio-classic-player),
.message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card),
.message:has(.saved-profile-blog-post .qchat-audio-classic-player) {
    --qchat-classic-audio-max-width: 300px;
    --qchat-saved-blog-classic-audio-card-width: min(360px, 100%);
    --qchat-saved-blog-lane-width: var(--qchat-saved-blog-classic-audio-card-width) !important;
    --qchat-audio-saved-blog-card-width: var(--qchat-saved-blog-classic-audio-card-width) !important;
}

html body #messagesContainer .message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex,
html body #messagesContainer .message:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex,
html body #messagesContainer .message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex.w-100,
html body #messagesContainer .message:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex.w-100,
.message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex,
.message:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex,
.message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex.w-100,
.message:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex.w-100 {
    width: var(--qchat-saved-blog-classic-audio-card-width) !important;
    max-width: var(--qchat-saved-blog-classic-audio-card-width) !important;
    min-width: 0 !important;
    flex: 0 1 var(--qchat-saved-blog-classic-audio-card-width) !important;
    box-sizing: border-box !important;
}

html body #messagesContainer .message.sent:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex,
html body #messagesContainer .message.sent:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex,
.message.sent:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex,
.message.sent:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex {
    margin-left: auto !important;
    margin-right: 0 !important;
    justify-content: flex-start !important;
}

html body #messagesContainer .message.received:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex,
html body #messagesContainer .message.received:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex,
.message.received:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) > .d-flex,
.message.received:has(.saved-profile-blog-post .qchat-audio-classic-player) > .d-flex {
    margin-left: 0 !important;
    margin-right: auto !important;
    justify-content: flex-start !important;
}

html body #messagesContainer .message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) .saved-profile-blog-post,
html body #messagesContainer .message:has(.saved-profile-blog-post .qchat-audio-classic-player) .saved-profile-blog-post,
.message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) .saved-profile-blog-post,
.message:has(.saved-profile-blog-post .qchat-audio-classic-player) .saved-profile-blog-post {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body #messagesContainer .message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) .saved-profile-blog-header,
html body #messagesContainer .message:has(.saved-profile-blog-post .qchat-audio-classic-player) .saved-profile-blog-header,
.message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card) .saved-profile-blog-header,
.message:has(.saved-profile-blog-post .qchat-audio-classic-player) .saved-profile-blog-header {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
}

@media (max-width: 360px) {
    html body #messagesContainer .message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card),
    html body #messagesContainer .message:has(.saved-profile-blog-post .qchat-audio-classic-player),
    .message:has(.saved-profile-blog-post .audio_card.qchat-audio-classic-card),
    .message:has(.saved-profile-blog-post .qchat-audio-classic-player) {
        --qchat-saved-blog-classic-audio-card-width: 100%;
    }
}

/* qchat v143: profile avatar online/offline dot — placed on avatar circle edge */
#profileAvatar .qchat-profile-avatar-edit-wrap.qchat-profile-avatar-status-wrap,
#modalProfileAvatar .qchat-profile-avatar-edit-wrap.qchat-profile-avatar-status-wrap,
#profileAvatar .qchat-profile-avatar-status-wrap,
#modalProfileAvatar .qchat-profile-avatar-status-wrap,
.qchat-profile-avatar-status-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    line-height: 0 !important;
    vertical-align: middle !important;
    max-width: 100% !important;
}

#profileAvatar .profile-avatar,
#modalProfileAvatar .profile-avatar,
#profileAvatar .avatar-placeholder,
#modalProfileAvatar .avatar-placeholder {
    display: block !important;
}

#profileAvatar .qchat-profile-avatar-presence,
#modalProfileAvatar .qchat-profile-avatar-presence,
.qchat-profile-avatar-presence {
    position: absolute !important;
    right: auto !important;
    bottom: auto !important;
    left: 88.5% !important;
    top: 88.5% !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    border: 3px solid var(--bs-body-bg, #fff) !important;
    background-color: #6c757d !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) !important;
    box-sizing: border-box !important;
    z-index: 30 !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) !important;
}

#profileAvatar .qchat-profile-avatar-presence.online,
#modalProfileAvatar .qchat-profile-avatar-presence.online,
.qchat-profile-avatar-presence.online {
    background-color: #28a745 !important;
}

#profileAvatar .qchat-profile-avatar-presence.offline,
#modalProfileAvatar .qchat-profile-avatar-presence.offline,
.qchat-profile-avatar-presence.offline {
    background-color: #6c757d !important;
}

body.dark-theme #profileAvatar .qchat-profile-avatar-presence,
body.dark-theme #modalProfileAvatar .qchat-profile-avatar-presence,
[data-bs-theme="dark"] #profileAvatar .qchat-profile-avatar-presence,
[data-bs-theme="dark"] #modalProfileAvatar .qchat-profile-avatar-presence,
body.dark-theme .qchat-profile-avatar-presence,
[data-bs-theme="dark"] .qchat-profile-avatar-presence {
    border-color: var(--qchat-dark-surface-2, #161b22) !important;
}


/* qchat v143: use original #profileStatus/#modalProfileStatus as avatar presence dots */
#profileAvatar .qchat-profile-avatar-status-wrap,
#modalProfileAvatar .qchat-profile-avatar-status-wrap,
#profileAvatar .qchat-profile-avatar-edit-wrap,
#modalProfileAvatar .qchat-profile-avatar-edit-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    line-height: 0 !important;
    vertical-align: middle !important;
}

#profileStatus.qchat-profile-avatar-presence,
#modalProfileStatus.qchat-profile-avatar-presence,
#profileAvatar .qchat-profile-avatar-presence,
#modalProfileAvatar .qchat-profile-avatar-presence {
    position: absolute !important;
    right: 13.5% !important;
    bottom: 13.5% !important;
    left: auto !important;
    top: auto !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    border: 3px solid var(--bs-body-bg, #fff) !important;
    background-color: #6c757d !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08) !important;
    box-sizing: border-box !important;
    z-index: 30 !important;
    pointer-events: none !important;
    transform: translate(50%, 50%) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: visible !important;
}

#profileStatus.qchat-profile-avatar-presence *,
#modalProfileStatus.qchat-profile-avatar-presence *,
#profileAvatar .qchat-profile-avatar-presence *,
#modalProfileAvatar .qchat-profile-avatar-presence * {
    display: none !important;
}

#profileStatus.qchat-profile-avatar-presence.online,
#modalProfileStatus.qchat-profile-avatar-presence.online,
#profileAvatar .qchat-profile-avatar-presence.online,
#modalProfileAvatar .qchat-profile-avatar-presence.online {
    background-color: #28a745 !important;
}

#profileStatus.qchat-profile-avatar-presence.offline,
#modalProfileStatus.qchat-profile-avatar-presence.offline,
#profileAvatar .qchat-profile-avatar-presence.offline,
#modalProfileAvatar .qchat-profile-avatar-presence.offline {
    background-color: #6c757d !important;
}


/* QChat profile/blog polish v23
 * Use the flat blog/comment layout on desktop as well as mobile, remove nested
 * card borders, and provide theme-aware zebra rows for comments. Light/auto
 * light use neutral blue-gray surfaces; dark/auto-dark use the feed palette.
 */
#profileTab .profile-blog-post {
    width: 100% !important;
    max-width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#profileTab .profile-blog-post .profile-blog-comments,
#profileTab .profile-blog-post .profile-blog-comments-body,
#profileTab .profile-blog-post .profile-blog-comments-list {
    width: 100% !important;
    max-width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#profileTab .profile-blog-post .profile-blog-comments-body,
#profileTab .profile-blog-post .profile-blog-comments-list {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
}

#profileTab .profile-blog-post .profile-blog-comment {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 14px 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    line-height: 1.45 !important;
}

#profileTab .profile-blog-post .profile-blog-comment + .profile-blog-comment {
    margin-top: 4px !important;
}

#profileTab .profile-blog-post .profile-blog-comment-date {
    margin-top: 3px !important;
    line-height: 1.3 !important;
}

#profileTab .profile-blog-post .profile-blog-comment-content {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
}

#profileTab .profile-blog-post .profile-blog-comment-actions {
    margin-top: 9px !important;
    line-height: 1.35 !important;
}

#profileTab .profile-blog-post .profile-blog-comment-replies {
    width: auto !important;
    max-width: none !important;
    margin-top: 12px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

#profileTab .profile-blog-post .profile-blog-comment-reply {
    border: 0 !important;
    box-shadow: none !important;
}

#profileTab .profile-blog-post .profile-blog-comment-form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px 0 0 !important;
    padding: 0 16px 16px !important;
    box-sizing: border-box !important;
}

/* Explicit light theme + auto theme while the OS is light. */
body.light-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(odd),
body.auto-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(odd) {
    background: rgba(13, 110, 253, 0.035) !important;
}
body.light-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(even),
body.auto-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(even) {
    background: rgba(108, 117, 125, 0.075) !important;
}
body.light-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(odd),
body.auto-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(odd) {
    background: rgba(13, 110, 253, 0.045) !important;
}
body.light-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(even),
body.auto-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(even) {
    background: rgba(108, 117, 125, 0.09) !important;
}

/* Dark theme matches the alternating message-feed feel without nested borders. */
body.dark-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(odd) {
    background: rgba(255, 255, 255, 0.035) !important;
}
body.dark-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(even) {
    background: rgba(255, 255, 255, 0.075) !important;
}
body.dark-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(odd) {
    background: rgba(255, 255, 255, 0.045) !important;
}
body.dark-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(even) {
    background: rgba(255, 255, 255, 0.085) !important;
}

/* System/auto dark must override the auto-light zebra above. */
@media (prefers-color-scheme: dark) {
    body.auto-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(odd) {
        background: rgba(255, 255, 255, 0.035) !important;
    }
    body.auto-theme #profileTab .profile-blog-post .profile-blog-comments-list > .profile-blog-comment:nth-child(even) {
        background: rgba(255, 255, 255, 0.075) !important;
    }
    body.auto-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(odd) {
        background: rgba(255, 255, 255, 0.045) !important;
    }
    body.auto-theme #profileTab .profile-blog-post .profile-blog-comment-replies > .profile-blog-comment:nth-child(even) {
        background: rgba(255, 255, 255, 0.085) !important;
    }
}

@media (min-width: 768px) {
    #profileTab .profile-blog-post .profile-blog-comment-content,
    #profileTab .profile-blog-post .profile-blog-comment-actions {
        margin-left: 44px !important;
        margin-right: 0 !important;
    }
    #profileTab .profile-blog-post .profile-blog-comment-replies {
        margin-left: 28px !important;
    }
}

/* QChat profile/blog full-layout parity v23 */
#profileTab .profile-blog-posts {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

#profileTab .profile-blog-posts > .profile-blog-post {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

#profileTab > .row > [class*="col-"] > .card,
#profileTab .profile-card,
#profileTab .profile-panel,
#profileTab .qchat-profile-right-block {
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
}

#profileTab .profile-blog-post .profile-blog-attachments,
#profileTab .profile-blog-post .profile-blog-comments {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

#profileTab .profile-blog-post .profile-blog-comments {
    border-top: 0 !important;
    padding-top: 10px !important;
}


/* QChat profile/blog zebra parity v24
 * Apply the same flat alternating surfaces to blog posts themselves, not only
 * comments.  The colors intentionally match the chat/comment palette so light,
 * dark and system themes feel like one interface.
 */
#profileTab .profile-blog-posts > .profile-blog-post {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.light-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(odd),
body.auto-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(odd) {
    background: rgba(13, 110, 253, 0.035) !important;
}
body.light-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(even),
body.auto-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(even) {
    background: rgba(108, 117, 125, 0.075) !important;
}
body.dark-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(odd) {
    background: rgba(255, 255, 255, 0.035) !important;
}
body.dark-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(even) {
    background: rgba(255, 255, 255, 0.075) !important;
}

@media (prefers-color-scheme: dark) {
    body.auto-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(odd) {
        background: rgba(255, 255, 255, 0.035) !important;
    }
    body.auto-theme #profileTab .profile-blog-posts > .profile-blog-post:nth-child(even) {
        background: rgba(255, 255, 255, 0.075) !important;
    }
}

/* Remove the remaining card-like outlines around blog feed shells in all themes. */
#profileTab .profile-blog-posts,
#profileTab .profile-blog-post,
#profileTab .profile-blog-post .profile-blog-post-body,
#profileTab .profile-blog-post .profile-blog-attachments,
#profileTab .profile-blog-post .profile-blog-comments,
#profileTab .profile-blog-post .profile-blog-comments-body,
#profileTab .profile-blog-post .profile-blog-comments-list {
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
}

/* QChat P101 — never expose the legacy rectangular Online/Offline badge before
 * applyProfileAvatarPresence promotes it into the avatar marker. */
#profileStatus:not(.qchat-profile-avatar-presence),
#modalProfileStatus:not(.qchat-profile-avatar-presence) {
    display: none !important;
}


/* QChat v26.4.1 — Profile Blog attachment browser entry. */
#profileTab .qchat-profile-blog-attachments-entry-wrap {
    width: 100%;
    padding: 0 0 8px;
    box-sizing: border-box;
}
#profileTab .qchat-profile-blog-attachments-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: rgba(13, 110, 253, 0.055);
    color: inherit;
    text-align: left;
    cursor: pointer;
}
#profileTab .qchat-profile-blog-attachments-entry:hover,
#profileTab .qchat-profile-blog-attachments-entry:focus-visible {
    background: rgba(13, 110, 253, 0.12);
}
#profileTab .qchat-profile-blog-attachments-entry:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.65);
    outline-offset: -2px;
}
#profileTab .qchat-profile-blog-attachments-entry:disabled {
    opacity: .55;
    cursor: default;
}
#profileTab .qchat-profile-blog-attachments-entry-label,
#profileTab .qchat-profile-blog-attachments-entry-tail {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
#profileTab .qchat-profile-blog-attachments-entry-label { font-weight: 600; }
#profileTab .qchat-profile-blog-attachments-count {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(13, 110, 253, .12);
    color: #0d6efd;
    font-size: .78rem;
    line-height: 1.35;
    text-align: center;
}
body.dark-theme #profileTab .qchat-profile-blog-attachments-entry {
    background: rgba(255, 255, 255, .055);
}
body.dark-theme #profileTab .qchat-profile-blog-attachments-entry:hover,
body.dark-theme #profileTab .qchat-profile-blog-attachments-entry:focus-visible {
    background: rgba(79, 140, 255, .18);
}
@media (prefers-color-scheme: dark) {
    body.auto-theme #profileTab .qchat-profile-blog-attachments-entry { background: rgba(255, 255, 255, .055); }
    body.auto-theme #profileTab .qchat-profile-blog-attachments-entry:hover,
    body.auto-theme #profileTab .qchat-profile-blog-attachments-entry:focus-visible { background: rgba(79, 140, 255, .18); }
}

.qchat-profile-blog-attachments-browser .qchat-profile-blog-browser-content .profile-blog-attachments {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
.qchat-profile-blog-attachments-browser .qchat-profile-blog-browser-content .qchat-file-bundle-title {
    display: none !important;
}
.qchat-profile-blog-attachments-browser .qchat-profile-blog-browser-content .profile-blog-file-bundle-message {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.qchat-profile-blog-attachments-browser .qchat-profile-blog-browser-content .qchat-file-bundle-groups {
    margin: 0 !important;
}
.qchat-profile-blog-attachments-browser .qchat-profile-blog-browser-summary {
    margin-bottom: 8px;
}
.qchat-profile-blog-attachments-browser .qchat-profile-blog-category-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.qchat-profile-blog-attachments-browser .qchat-profile-blog-category-count {
    float: right;
    font-variant-numeric: tabular-nums;
}

.qchat-profile-blog-attachments-browser .qchat-profile-blog-link-result a {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#qchatProfileBlogAttachmentsModal.qchat-under-image-viewer {
    visibility: hidden !important;
    pointer-events: none !important;
}
