.image-upload-component {
    margin-bottom: var(--spacing-2xl);
    position: relative;
}

.image-upload-component label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-text-primary), var(--color-text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.image-upload-input-wrapper {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.image-upload-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-2xl) var(--spacing-lg);
    border: 2px dashed var(--color-border-medium);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg,
        rgba(var(--color-primary-rgb), 0.05) 0%,
        rgba(var(--color-primary-rgb), 0.02) 100%);
    cursor: pointer;
    transition: all var(--transition-cubic);
    text-align: center;
}

.image-upload-button:hover {
    border-color: var(--color-primary);
    background: linear-gradient(135deg,
        rgba(var(--color-primary-rgb), 0.08) 0%,
        rgba(var(--color-primary-rgb), 0.04) 100%);
}

.image-upload-button.drag-over {
    border-color: var(--color-primary);
    background: linear-gradient(135deg,
        rgba(var(--color-primary-rgb), 0.12) 0%,
        rgba(var(--color-primary-rgb), 0.06) 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 32px;
    display: block;
}

.upload-text {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 14px;
}

.upload-hint {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.image-upload-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-gray-100);
    border: 1px solid var(--color-border-medium);
    transition: all var(--transition-cubic);
}

.image-preview-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.15);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-remove-btn {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(var(--color-error-rgb), 0.9);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-cubic);
    opacity: 0;
}

.image-preview-item:hover .image-remove-btn {
    opacity: 1;
}

.image-remove-btn:hover {
    background: var(--color-error);
    transform: scale(1.1);
}

.image-remove-btn:active {
    transform: scale(0.95);
}

.image-upload-help-text {
    margin-top: var(--spacing-xs);
    font-size: 12px;
    color: var(--color-text-tertiary);
    text-align: left;
}

.image-upload-error {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(var(--color-error-rgb), 0.1);
    border: 1px solid rgba(var(--color-error-rgb), 0.2);
    border-radius: var(--radius-md);
    color: var(--color-error);
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-color-scheme: dark) {
    .image-upload-button {
        background: linear-gradient(135deg,
            rgba(var(--color-primary-rgb), 0.08) 0%,
            rgba(var(--color-primary-rgb), 0.03) 100%);
    }

    .image-upload-button:hover {
        background: linear-gradient(135deg,
            rgba(var(--color-primary-rgb), 0.12) 0%,
            rgba(var(--color-primary-rgb), 0.05) 100%);
    }

    .image-upload-button.drag-over {
        background: linear-gradient(135deg,
            rgba(var(--color-primary-rgb), 0.15) 0%,
            rgba(var(--color-primary-rgb), 0.08) 100%);
    }

    .image-preview-item {
        background: var(--color-gray-800);
    }
}

@media (max-width: 768px) {
    .image-upload-button {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .upload-icon {
        font-size: 24px;
    }

    .upload-text {
        font-size: 13px;
    }

    .upload-hint {
        font-size: 11px;
    }

    .image-upload-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }
}

.image-upload-component.compact {
    margin-bottom: var(--spacing-lg);
}

.image-upload-component.compact .image-upload-button {
    padding: var(--spacing-lg) var(--spacing-md);
}

.image-upload-component.compact .upload-icon {
    font-size: 24px;
}

.image-upload-component.compact .upload-text {
    font-size: 13px;
}