/**
 * Image Fallback Styles for AiChee
 * استایل‌های placeholder برای عکس‌های گم شده
 */

/* Placeholder Container */
.image-fallback-placeholder {
    display: inline-block;
    position: relative;
    background: linear-gradient(135deg, #141920, #232F3F);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16/9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 0;
    padding: 0;
}

/* Mirror Surface */
.mirror-surface {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(124, 58, 237, 0.1),
        rgba(37, 99, 235, 0.1),
        rgba(245, 158, 11, 0.1),
        rgba(5, 150, 105, 0.1));
    overflow: hidden;
}

/* Comet Animation */
.comet {
    position: absolute;
    top: 30%;
    right: -100px;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.8);
    animation: comet-move 4s linear infinite;
}

.comet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 60px;
    height: 2px;
    background: linear-gradient(270deg, transparent, rgba(255, 255, 255, 0.8));
    transform: translateY(-50%);
}

.comet::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 30px;
    height: 10px;
    background: linear-gradient(270deg, transparent, rgba(124, 58, 237, 0.6));
    transform: translateY(-50%);
    border-radius: 50%;
    filter: blur(2px);
}

/* Reflection Effect */
.reflection {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, 
        rgba(255, 255, 255, 0.1),
        transparent);
    transform: scaleY(-1);
}

/* Color Accent Bar */
.color-accent {
    position: absolute;
    width: 100%;
    height: 4px;
    bottom: 0;
    background: linear-gradient(90deg, 
        #7C3AED,
        #2563EB,
        #F59E0B,
        #059669,
        #FF9900,
        #00B9E7);
}

/* Comet Animation Keyframes */
@keyframes comet-move {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(-100vw - 200px)) translateY(0);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .image-fallback-placeholder {
        max-width: 100%;
        border-radius: 6px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }
}

@media (max-width: 480px) {
    .image-fallback-placeholder {
        border-radius: 4px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Product Image Specific Styles */
.product-cover .image-fallback-placeholder {
    max-width: 300px;
    aspect-ratio: 4/3;
}

.avatar .image-fallback-placeholder {
    max-width: 50px;
    aspect-ratio: 1/1;
    border-radius: 50%;
}

.thumbnail .image-fallback-placeholder {
    max-width: 100px;
    aspect-ratio: 16/9;
}

/* Hover Effects */
.image-fallback-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

/* Loading State */
.image-fallback-placeholder.loading {
    opacity: 0.7;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Hidden Original Image */
.image-fallback-placeholder img {
    display: none !important;
}

/* Fallback Applied Indicator */
img[data-fallback-applied="true"] {
    display: none !important;
}
