/* ==================== IMAGE UPLOAD MANAGER STYLES ==================== */

.image-upload-manager {
    width: 100%;
    margin: 1rem 0;
}

.image-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.image-upload-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #FF8000;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.image-upload-label:hover {
    background: #e67300;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 128, 0, 0.3);
}

.image-upload-label svg {
    width: 20px;
    height: 20px;
}

.image-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.images-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    min-height: 100px;
}

.image-item {
    position: relative;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-item:hover {
    border-color: #FF8000;
    box-shadow: 0 4px 12px rgba(255, 128, 0, 0.2);
    transform: translateY(-2px);
}

.image-item.primary {
    border-color: #FF8000;
    border-width: 3px;
}

.image-preview {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
}

.image-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.move-up-btn,
.move-down-btn,
.remove-image-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.move-up-btn,
.move-down-btn {
    background: #3498db;
    color: white;
    font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
}

.move-up-btn:hover,
.move-down-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.move-up-btn:disabled,
.move-down-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.5;
}

.remove-image-btn {
    background: #e74c3c;
    color: white;
    flex: 1;
}

.remove-image-btn:hover {
    background: #c0392b;
    transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .images-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .image-upload-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .image-upload-label {
        justify-content: center;
    }

    .image-count {
        text-align: center;
    }

    .image-item {
        padding: 0.5rem;
    }

    .remove-image-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Dark mode support */
.dark-mode .image-upload-header {
    background: #2c3e50;
    border-color: #34495e;
}

.dark-mode .image-count {
    background: #34495e;
    color: #ecf0f1;
    border-color: #2c3e50;
}

.dark-mode .image-item {
    background: #34495e;
    border-color: #2c3e50;
}

.dark-mode .image-item:hover {
    border-color: #FF8000;
}

.dark-mode .image-item.primary {
    border-color: #FF8000;
    border-width: 3px;
}

.dark-mode .move-up-btn,
.dark-mode .move-down-btn {
    background: #2980b9;
}

.dark-mode .move-up-btn:hover,
.dark-mode .move-down-btn:hover {
    background: #3498db;
}
