/* Forum Image Upload */
.forum-image-upload {
    margin: 0.75em 0;
}

.forum-image-upload-row {
    display: flex;
    align-items: center;
    gap: 0.6em;
    transition: opacity 0.25s, transform 0.25s;
}

.forum-image-upload-row.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.forum-image-upload-row.is-showing {
    animation: slideDown 0.3s ease forwards;
}

.forum-image-upload label[for="forum_image"] {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    cursor: pointer;
    font-size: 0.9em;
    color: #f86a22;
    padding: 0.4em 0.8em;
    border: 1px solid rgba(248, 106, 34, 0.4);
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
}

.forum-image-upload label[for="forum_image"]:hover {
    background: rgba(248, 106, 34, 0.1);
}

.forum-image-upload label .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.forum-image-upload input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.forum-image-cooldown {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.4);
}

/* Upload error notice in comment */
.forum-image-upload-error {
    font-size: 0.85em;
    color: #e74c3c;
    margin-top: 0.5em;
    padding: 0.35em 0.7em;
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    border-radius: 2px;
}

.forum-image-upload-error .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: text-top;
    margin-right: 0.2em;
}

/* Inline error */
.forum-image-error {
    font-size: 0.85em;
    color: #e74c3c;
    margin: 0.4em 0 0;
    padding: 0.35em 0.7em;
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    border-radius: 2px;
}

/* Animations */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes previewIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* Preview - own line */
.forum-image-preview {
    position: relative;
    margin-top: 0.75em;
    display: inline-block;
}

.forum-image-preview.is-entering {
    animation: previewIn 0.3s ease forwards;
}

.forum-image-preview.is-leaving {
    transition: opacity 0.25s, transform 0.25s;
    opacity: 0;
    transform: scale(0.92);
}

.forum-image-preview img {
    display: block;
    max-width: 280px;
    max-height: 200px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
}

.forum-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    border: 2px solid #1a1a2e;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.forum-image-remove:hover {
    background: #c0392b;
}

/* Image in comment */
.forum-comment-image {
    margin-top: 0.75em;
}

.forum-comment-image a {
    display: inline-block;
}

.forum-comment-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forum-comment-image.hidden-by-mod {
    opacity: 0.4;
}

.forum-comment-image.hidden-by-mod img {
    filter: blur(10px);
}

.image-hidden-notice {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    margin: 0 0 0.3em;
}

.image-hidden-notice .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: text-top;
}

/* Mod button - below image */
.forum-image-mod-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-top: 0.5em;
    padding: 0.3em 0.7em;
    font-size: 0.8em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.forum-image-mod-btn:hover {
    background: rgba(248, 106, 34, 0.12);
    border-color: rgba(248, 106, 34, 0.5);
    color: #f86a22;
}

.forum-image-mod-btn.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.forum-image-mod-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}
