/* Neuven CRP Builder Styles */

/* Variables */
:root {
    --primary-color: #0073aa;
    --secondary-color: #005a87;
    --success-color: #46b450;
    --error-color: #dc3232;
    --text-color: #333;
    --border-color: #ddd;
    --bg-light: #f5f5f5;
}

/* Builder Container */
.neuven-crp-builder {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.builder-header {
    text-align: center;
    margin-bottom: 40px;
}

.builder-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.step-indicator {
    color: #666;
    font-size: 0.9rem;
}

/* Step Wrapper */
.step-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.step-content {
    margin-bottom: 30px;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--secondary-color);
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.1rem;
}

/* Form Elements */
.form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.required {
    color: var(--error-color);
}

.intro-text {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

/* Scope Badges */
.scope-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

.scope-badge.scope-1 {
    background: rgba(74, 144, 226, 0.2);
    color: #4A90E2;
}

.scope-badge.scope-2 {
    background: rgba(80, 227, 194, 0.2);
    color: #1a9d88;
}

.scope-badge.scope-3 {
    background: rgba(245, 166, 35, 0.2);
    color: #c27b0e;
}

/* Info Boxes */
.info-box {
    background: #e7f3f8;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.info-box h4 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Emissions Display */
.current-emissions-summary {
    margin-top: 30px;
}

.emissions-display .total {
    text-align: center;
    margin-bottom: 20px;
}

.emissions-display .total .value {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.emissions-display .total .unit {
    font-size: 1.2rem;
    color: #666;
}

.emissions-display .breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.emissions-display .scope-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
}

.emissions-display .scope-item .label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.emissions-display .scope-item .value {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

/* Review Sections */
.review-section {
    margin-bottom: 40px;
}

.review-section h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.review-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.review-item .label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.review-item .value {
    display: block;
    font-size: 1rem;
    color: #333;
}

/* Total Emissions Display */
.total-emissions {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    margin-bottom: 30px;
}

.total-emissions .value {
    display: block;
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.total-emissions .unit {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.total-emissions .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Scope Boxes */
.scope-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.scope-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-left-width: 4px;
    border-radius: 6px;
    padding: 20px;
}

.scope-box .scope-header {
    margin-bottom: 10px;
}

.scope-box .scope-name {
    font-weight: 600;
    color: #333;
}

.scope-box .scope-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.scope-box .scope-value .unit {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

.scope-box .scope-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Warning & Error Boxes */
.warning-box,
.error-box {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.error-box {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Generate Actions */
.generate-actions {
    text-align: center;
    margin-top: 40px;
}

/* Success State */
.generation-success {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    font-size: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.generation-success h2 {
    color: var(--success-color);
    margin-bottom: 15px;
}

.generation-success p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Loading & Error States */
.neuven-crp-loading,
.neuven-crp-error {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .neuven-crp-builder {
        padding: 10px;
    }

    .builder-header h1 {
        font-size: 1.5rem;
    }

    .step-wrapper {
        padding: 20px;
    }

    .step-navigation {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .emissions-display .breakdown {
        grid-template-columns: 1fr;
    }

    .scope-boxes {
        grid-template-columns: 1fr;
    }
}
/* PPN 06 mandatory category note */
.section-note {
    font-size: 13px;
    color: #666;
    margin: -8px 0 12px 0;
    font-style: italic;
}

/* Review step - data summary table */
.review-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
}
.review-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}
.review-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #eee;
}
.review-table tr:hover {
    background-color: #f8f9fa;
}
.review-table tr.section-header td {
    background-color: #e9ecef;
    font-weight: 600;
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #dee2e6;
}
.review-table tbody tr:not(.section-header) td:first-child {
    padding-left: 24px;
    color: #555;
}
.review-table tbody tr:not(.section-header) td:last-child {
    text-align: right;
    font-weight: 500;
    font-family: monospace;
}
.review-subsection {
    margin-top: 8px;
    margin-bottom: 4px;
}

/* Declaration box on review step */
.declaration-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #2c5aa0;
    border-radius: 4px;
    padding: 16px 20px;
}
.declaration-box h3 {
    margin-top: 0;
    color: #2c5aa0;
}
.declaration-box p {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    margin: 8px 0;
}
.declaration-box p:last-child {
    margin-bottom: 0;
}
