/* Image Upload Error Modal Styles */
.image-upload-error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    animation: fadeIn 0.3s ease;
}

.image-upload-error-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Prevent body scroll when modal is open */
body.image-upload-error-modal-open {
    overflow: hidden;
}

.image-upload-error-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-upload-error-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    width: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s ease;
    z-index: 100000;
}

.image-upload-error-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.image-upload-error-modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: #d32f2f;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-upload-error-modal-header h3 i {
    font-size: 1.2em;
}

.image-upload-error-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.image-upload-error-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.image-upload-error-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.error-message {
    font-size: 1em;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

.error-code {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    margin-bottom: 20px;
}

.error-guidance {
    background: #f8f9fa;
    border-left: 4px solid #d32f2f;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.error-guidance h4 {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    color: #333;
    font-weight: 600;
}

.error-guidance ul {
    margin: 0;
    padding-left: 20px;
}

.error-guidance li {
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.error-guidance li:last-child {
    margin-bottom: 0;
}

/* Error type specific styling */
.image-upload-error-modal-header.error-file_size h3 {
    color: #d32f2f;
}

.image-upload-error-modal-header.error-file_size .error-guidance {
    border-left-color: #d32f2f;
}

.image-upload-error-modal-header.error-invalid_type h3 {
    color: #f57c00;
}

.image-upload-error-modal-header.error-invalid_type .error-guidance {
    border-left-color: #f57c00;
}

.image-upload-error-modal-header.error-limit_reached h3 {
    color: #1976d2;
}

.image-upload-error-modal-header.error-limit_reached .error-guidance {
    border-left-color: #1976d2;
}

.image-upload-error-modal-header.error-server_error h3 {
    color: #c62828;
}

.image-upload-error-modal-header.error-server_error .error-guidance {
    border-left-color: #c62828;
}

/* Icon animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.image-upload-error-modal-header h3 i.pulse {
    animation: pulse 1.5s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .image-upload-error-modal-content {
        width: 95vw;
        max-height: 95vh;
        border-radius: 4px;
    }

    .image-upload-error-modal-header {
        padding: 15px 20px;
    }

    .image-upload-error-modal-header h3 {
        font-size: 1.1em;
    }

    .image-upload-error-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .image-upload-error-modal-content {
        width: 98vw;
    }

    .image-upload-error-modal-header {
        padding: 12px 15px;
    }

    .image-upload-error-modal-header h3 {
        font-size: 1em;
        gap: 8px;
    }

    .image-upload-error-modal-body {
        padding: 15px;
    }

    .error-message {
        font-size: 0.95em;
    }

    .error-guidance {
        padding: 12px;
    }

    .error-guidance li {
        font-size: 0.85em;
    }
}
