/* Image Fallback Styles */
img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

img[src*="upload"] {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Loading state */
img[data-loading="true"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error state */
img[data-error="true"] {
    border: 2px dashed #e74c3c !important;
    background-color: #fadbd8 !important;
    position: relative;
}

img[data-error="true"]::after {
    content: "❌ Gambar tidak dapat dimuat";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
}

/* Success state */
img[data-loaded="true"] {
    border: 2px solid #27ae60 !important;
}

/* Untuk gambar dalam aspek penilaian */
.aspek-item img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px 0;
}

.mini-editor-content img {
    max-width: 100% !important;
    height: auto !important;
}