/* Simulasi PC - Rakitan.com Style */

:root {
    --primary-red: #dc3545;
    --secondary-blue: #007bff;
    --success-green: #25d366;
    --light-gray: #f8f9fa;
    --border-gray: #dee2e6;
    --text-dark: #212529;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: var(--text-dark);
}

/* Container */
.simulator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.sim-header {
    background: var(--primary-red);
    color: white;
    padding: 2rem;
    border-radius: 8px 8px 0 0;
    text-align: center;
    margin-bottom: 0;
}

.sim-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sim-header .subtitle {
    font-size: 1rem;
    opacity: 0.95;
}

/* Build Presets */
.build-presets {
    background: var(--light-gray);
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-gray);
}

.preset-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary-red);
    background: white;
    color: var(--primary-red);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: var(--primary-red);
    color: white;
}

.preset-btn.active {
    background: var(--primary-red);
    color: white;
}

.preset-btn i {
    margin-right: 0.4rem;
}

/* Main Table */
.sim-table-container {
    background: white;
    border: 1px solid var(--border-gray);
    border-top: none;
}

.component-table {
    width: 100%;
    border-collapse: collapse;
}

.component-table thead {
    background: var(--light-gray);
}

.component-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-gray);
    font-size: 0.9rem;
}

.component-table tbody tr {
    border-bottom: 1px solid var(--border-gray);
    transition: background 0.2s;
}

.component-table tbody tr:hover {
    background: #f9f9f9;
}

.component-table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Component Icons */
.component-icon {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary-red);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-red);
    font-size: 1.5rem;
}

/* Component Name Column */
.component-name {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.required-badge {
    background: var(--primary-red);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Select Dropdown */
.component-select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.component-select:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Quantity Input */
.qty-input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    text-align: center;
}

/* Price Column */
.price-cell {
    font-weight: 600;
    color: var(--primary-red);
    font-size: 1rem;
}

/* Action Buttons in Table */
.btn-remove {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-remove:hover {
    background: #c82333;
}

/* Total Summary Row */
.total-row {
    background: var(--light-gray);
    font-weight: 700;
}

.total-row td {
    padding: 1.5rem 1rem;
    font-size: 1.2rem;
}

.total-price-value {
    color: var(--primary-red);
    font-size: 1.5rem;
}

/* Bottom Actions */
.bottom-actions {
    background: var(--light-gray);
    padding: 1.5rem;
    border: 1px solid var(--border-gray);
    border-top: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-reset {
    background: var(--primary-red);
    color: white;
}

.btn-reset:hover {
    background: #c82333;
}

.btn-print {
    background: var(--secondary-blue);
    color: white;
}

.btn-print:hover {
    background: #0056b3;
}

.btn-whatsapp {
    background: var(--success-green);
    color: white;
}

.btn-whatsapp:hover {
    background: #128c7e;
}

.btn-save {
    background: #6c757d;
    color: white;
}

.btn-save:hover {
    background: #545b62;
}

/* Compatibility Box */
.compatibility-box {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid;
}

.compatibility-box.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.compatibility-box.warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.compatibility-box.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.compat-message {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Performance Meters */
.performance-panel {
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 5px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.performance-panel h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.perf-meter {
    margin-bottom: 1rem;
}

.perf-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.meter-bar {
    height: 30px;
    background: var(--light-gray);
    border-radius: 15px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), #ff6b6b);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.8rem;
    color: white;
    font-weight: 600;
}

/* Info Box */
.info-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 5px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.info-box h3 {
    color: #004085;
    margin-bottom: 1rem;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-box li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-blue);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .component-table {
        font-size: 0.85rem;
    }

    .component-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .bottom-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }
}

/* Hide old layout elements */
.simulator-grid,
.components-panel,
.summary-panel {
    display: none !important;
}