/*
 * Friendnom Create Post - isolated UI repair.
 * Only visual changes to photo preview/remove button + existing Post visibility.
 */

/* Never add a black/grey canvas behind a selected PHOTO. */
#fn-photo-preview {
    position: relative !important;
    background: transparent !important;
}

#fn-photo-preview > #fn-photo-preview-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 360px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
}

/*
 * Existing functional button becomes a Facebook-style X.
 * Same element/id is preserved, so the existing clearPhoto() click listener survives.
 */
#fn-photo-preview > #fn-photo-remove {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 50 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 999px !important;

    background: rgba(255,255,255,.96) !important;
    color: #65676b !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 27px !important;
    font-weight: 400 !important;
    line-height: 36px !important;
    text-align: center !important;

    box-shadow: 0 1px 4px rgba(0,0,0,.18) !important;
    cursor: pointer !important;
}

#fn-photo-preview > #fn-photo-remove:hover {
    background: #f0f2f5 !important;
}

/* Keep the existing Post button reachable in tall previews. */
#fn-composer-modal #fn-publish-post {
    display: flex !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
    width: 100% !important;
}
