/* Comment attachment display (DCO + WBA compat) */

.comment-text .wba-comment-attachments {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.comment-text .wba-comment-attachments .dco-attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

.comment-text .wba-comment-attachments .dco-attachment,
.comment-text .wba-comment-attachments .dco-attachment-gallery .dco-attachment {
    margin: 0 !important;
    padding: 0;
}

.comment-text .wba-comment-attachments .dco-image-attachment a {
    display: inline-block;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.comment-text .wba-comment-attachments .dco-image-attachment a:hover,
.comment-text .wba-comment-attachments .dco-image-attachment a:focus-visible {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.comment-text .wba-comment-attachments .wba-comment-attachment-thumb,
.comment-text .wba-comment-attachments .dco-image-attachment img {
    display: block;
    max-width: 150px;
    width: auto;
    height: auto;
    border-radius: 6px;
}

.comment-text .wba-comment-attachments .dco-misc-attachment,
.comment-text .wba-comment-attachments .dco-audio-attachment,
.comment-text .wba-comment-attachments .dco-video-attachment {
    margin: 0 !important;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

.comment-text .wba-comment-attachments .dco-misc-attachment a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    text-decoration: none;
    word-break: break-word;
}

.comment-text .wba-comment-attachments .dco-misc-attachment a::before {
    content: "📎";
    flex-shrink: 0;
    font-size: 0.95em;
    line-height: 1;
}

.comment-text .wba-comment-attachments .dco-misc-attachment a:hover,
.comment-text .wba-comment-attachments .dco-misc-attachment a:focus-visible {
    text-decoration: underline;
}

.comment-text .wba-comment-attachments .dco-audio-attachment audio,
.comment-text .wba-comment-attachments .dco-video-attachment video {
    max-width: 100%;
    display: block;
}

/* Fallback when wrapper filter has not run yet */
.comment-text > .dco-attachment-gallery,
.comment-text > .dco-attachment,
.comment-text > p.dco-attachment {
    margin-top: 12px !important;
}

.comment-text > .dco-attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.comment-text > .dco-attachment-gallery + .dco-attachment,
.comment-text > .dco-attachment + .dco-attachment {
    margin-top: 10px !important;
}
