/**
 * PC Builder Public Styles
 */

/* Builder Wrapper */
.pcb-builder-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pcb-builder-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
}

.pcb-builder-header h2 {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: 700;
}

.pcb-builder-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

/* Builder Container */
.pcb-builder-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Component Panel */
.pcb-component-panel {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pcb-component-panel h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.pcb-component-category {
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pcb-component-category:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.pcb-category-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s;
}

.pcb-category-header:hover {
    background: #e9ecef;
}

.pcb-icon {
    font-size: 24px;
    margin-right: 12px;
}

.pcb-category-header h4 {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pcb-select-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.pcb-select-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.pcb-selected-component {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.pcb-no-selection {
    margin: 0;
    color: #999;
    font-style: italic;
}

.pcb-component-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pcb-component-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.pcb-component-details {
    flex: 1;
}

.pcb-component-name {
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.pcb-component-specs {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.pcb-component-price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.pcb-remove-component {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: opacity 0.2s;
}

.pcb-remove-component:hover {
    opacity: 0.9;
}

/* Summary Panel */
.pcb-summary-panel {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.pcb-summary-panel h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.pcb-compatibility-status {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
}

.pcb-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
}

.pcb-status-unknown {
    background: #fff3cd;
    color: #856404;
}

.pcb-status-compatible {
    background: #d4edda;
    color: #155724;
}

.pcb-status-incompatible {
    background: #f8d7da;
    color: #721c24;
}

.pcb-status-icon {
    font-size: 20px;
}

.pcb-compatibility-issues {
    margin-top: 10px;
}

.pcb-issue-item {
    padding: 8px;
    margin: 5px 0;
    border-left: 3px solid #dc3545;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
}

.pcb-issue-item.warning {
    border-left-color: #ffc107;
}

.pcb-price-summary {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 8px;
    color: #fff;
}

.pcb-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pcb-total-price {
    font-size: 32px;
    font-weight: 700;
}

.pcb-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pcb-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.pcb-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.pcb-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pcb-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.pcb-btn-secondary:hover {
    background: #5a6268;
}

.pcb-login-notice {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 10px 0 0 0;
}

/* Modal */
.pcb-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.2s;
}

.pcb-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcb-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s;
}

.pcb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.pcb-modal-title {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.pcb-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.pcb-modal-close:hover {
    color: #333;
}

.pcb-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.pcb-component-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.pcb-component-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.pcb-component-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.pcb-component-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.pcb-component-card h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.pcb-component-card p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
}

.pcb-component-card .price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

/* Build Summary (Shortcode) */
.pcb-build-summary {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 20px auto;
}

.pcb-build-summary h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
}

.pcb-summary-status {
    margin-bottom: 20px;
}

.pcb-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.pcb-badge-success {
    background: #d4edda;
    color: #155724;
}

.pcb-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.pcb-summary-item {
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pcb-summary-total {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pcb-builder-container {
        grid-template-columns: 1fr;
    }

    .pcb-summary-panel {
        position: static;
    }

    .pcb-component-list {
        grid-template-columns: 1fr;
    }

    .pcb-builder-header h2 {
        font-size: 28px;
    }
}