/* Modern Frontend styles */
.wp-pfp-generator { 
    display: flex; 
    flex-direction: column;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Canvas area - komt eerst op mobile */
.wp-pfp-canvas-wrap { 
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#pfp-canvas { 
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    max-width: 100%;
    height: auto;
    display: block;
}

.pfp-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Sidebar met accordions */
.wp-pfp-sidebar { 
    order: 2;
    width: 100%;
    max-height: none;
    background: transparent;
    border: none;
    padding: 0;
}

/* Accordion styling */
.accordion-item { 
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.2s ease;
}

.accordion-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.accordion-header { 
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    background: #fafafa;
    border: none;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background: #f5f5f5;
}

.accordion-header::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.accordion-header.active::after {
    transform: rotate(180deg);
}

.accordion-content { 
    display: none;
    padding: 20px;
    background: #ffffff;
}

/* Options grid */
.pfp-options { 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.pfp-option { 
    text-align: center;
    cursor: pointer;
    border-radius: 12px;
    padding: 12px;
    border: 2px solid transparent;
    background: #f9fafb;
    transition: all 0.2s ease;
    position: relative;
}

.pfp-option:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.pfp-option img { 
    display: block;
    width: 100%;
    height: 64px;
    object-fit: contain;
    margin: 0 auto 8px;
}

.pfp-option.selected { 
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.pfp-option.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #3b82f6;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.pfp-opt-label {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pfp-option.selected .pfp-opt-label {
    color: #3b82f6;
    font-weight: 500;
}

/* Control buttons */
.pfp-controls { 
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button { 
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.button-primary { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.button-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Desktop layout */
@media (min-width: 768px) {
    .wp-pfp-generator { 
        flex-direction: row;
        align-items: flex-start;
    }
    
    .wp-pfp-canvas-wrap {
        order: 2;
        flex: 0 0 auto;
        position: sticky;
        top: 20px;
    }
    
    .wp-pfp-sidebar {
        order: 1;
        flex: 1;
        max-height: 80vh;
        overflow-y: auto;
        padding-right: 20px;
    }
    
    /* Custom scrollbar */
    .wp-pfp-sidebar::-webkit-scrollbar {
        width: 8px;
    }
    
    .wp-pfp-sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .wp-pfp-sidebar::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    
    .wp-pfp-sidebar::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}

@media (min-width: 1024px) {
    .pfp-options { 
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

/* Loading state */
.pfp-option.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state */
.pfp-options:empty::after {
    content: 'Geen opties beschikbaar';
    display: block;
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 14px;
}