/* ==========================================================================
   REPORTIT KOMPLAIN PHOTO PREVIEW V34.2
   Additive only - tidak mengubah upload/compression existing.
   ========================================================================== */

.photo-preview-wrap {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    background:
        radial-gradient(circle at 50% 15%, rgba(198, 30, 36, .045), transparent 42%),
        #f4f6f9;
    border: 1px dashed #d7dde6;
    border-radius: 14px;
}

.photo-preview-wrap::before {
    content: "Pratinjau foto\A Foto yang dipilih akan tampil di sini";
    white-space: pre;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 190px;
    padding: 32px 18px;
    color: #7a8494;
    font-size: 13px;
    line-height: 1.7;
    font-weight: 500;
    background:
        radial-gradient(circle at center, rgba(198, 30, 36, .055) 0 34px, transparent 35px);
}

.photo-preview-wrap:not(.rit-has-photo) #photoPreview {
    display: none !important;
}

.photo-preview-wrap.rit-has-photo::before {
    display: none !important;
}

.photo-preview-wrap.rit-has-photo #photoPreview {
    display: block !important;
    width: 100%;
    height: auto;
    max-height: 440px;
    min-height: 190px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
    background: #f4f6f9;
}

.photo-preview-wrap.rit-preview-loading::after {
    content: "Memuat pratinjau...";
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 18px rgba(20, 30, 50, .08);
    color: #6b7482;
    font-size: 11px;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .photo-preview-wrap,
    .photo-preview-wrap::before {
        min-height: 165px;
    }

    .photo-preview-wrap.rit-has-photo #photoPreview {
        min-height: 165px;
        max-height: 360px;
    }
}
