/* Placeholder styles to prevent layout shift */
#header-placeholder {
    min-height: 70px; /* Match header height */
}
#footer-placeholder {
    min-height: 250px; /* Approximate height of footer */
}

/* Wiki article specific styles */
.wiki-content {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.breadcrumbs {
    display: flex;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary-color);
}

.breadcrumbs span:not(:last-child)::after {
    content: "›";
    margin: 0 var(--spacing-sm);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background-color: rgba(10, 94, 149, 0.1);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--border-radius-xl);
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.progress-bar {
    height: 8px;
    background-color: var(--bg-dark);
    border-radius: var(--border-radius-xl);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 65%; /* Partial automation level */
}

.process-section {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.process-section h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.step-list {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.step-list li {
    margin-bottom: var(--spacing-sm);
}

.automation-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.timeline-entry {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.timeline-year {
    background-color: var(--primary-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.timeline-year-prediction {
    background-color: rgba(11, 186, 172);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.timeline-content {
    flex: 1;
}

.method-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.method-tab {
    padding: var(--spacing-sm) var(--spacing-lg);
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.method-tab.active {
    border-bottom: 3px solid var(--primary-color);
    font-weight: 500;
}

.contributors-section {
    margin-top: var(--spacing-xxl);
    padding: var(--spacing-lg);
    background-color: var(--bg-light);
    border-radius: var(--border-radius-lg);
}

/* Tab content styling */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Competing approaches section */
.competing-approaches {
    margin-top: var(--spacing-xxl);
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-color);
}

.approaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.approach-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.approach-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.approach-preview {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: var(--font-size-xs);
    background-color: #edf2f7; /* Darkened slightly from #f6f8fa */
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin: var(--spacing-sm) 0;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre;
}

.approach-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
}

.vote-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.vote-button svg {
    width: 16px;
    height: 16px;
}

/* Toggle switch for competing models */
.competing-toggle {
    display: flex;
    justify-content: center;
    margin: var(--spacing-xl) 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    margin: 0 var(--spacing-md);
    font-weight: 500;
}

/* Feedback form styling */
.feedback-form-container {
    display: none;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.feedback-form-container.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.feedback-form-field {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.feedback-form-field label {
    font-weight: 500;
    color: var(--text-color);
}

.feedback-form-field input,
.feedback-form-field textarea {
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    width: 100%;
}

.feedback-form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.feedback-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
}

.feedback-message {
    display: none;
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    text-align: center;
    margin-top: var(--spacing-md);
}

.feedback-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    display: block;
}

.feedback-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Persona Selector Styles */
.persona-selector-container {
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.persona-selector-container label {
    font-weight: 500;
}

#persona-selector {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    min-width: 150px;
}

/* Metrics Icon Styles */
.metrics-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em; /* Adjust size as needed */
    padding: 0 var(--spacing-xs);
    margin-left: var(--spacing-xs);
    vertical-align: middle;
}

.metrics-icon:hover {
    opacity: 0.7;
}

/* Transparency Icon Styles - matching metrics icon */
.transparency-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em; /* Same size as metrics icon */
    padding: 0 var(--spacing-xs);
    margin-left: var(--spacing-xs);
    vertical-align: middle;
}

.transparency-icon:hover {
    opacity: 0.7;
}

/* Transparency Modal Content Styles */
.transparency-content {
    padding: var(--spacing-md, 15px) 0;
}

.step-info {
    margin-bottom: var(--spacing-lg, 20px);
    padding: var(--spacing-md, 15px);
    background-color: var(--bg-light, #f8f9fa);
    border-radius: var(--border-radius-md, 6px);
    border-left: 4px solid var(--primary-color, #007bff);
}

.step-info h4 {
    margin: 0 0 var(--spacing-sm, 10px) 0;
    color: var(--primary-color, #007bff);
}

.step-info p {
    margin: 0;
    color: var(--text-muted, #666);
    line-height: 1.5;
}

.input-output-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg, 20px);
    margin-top: var(--spacing-lg, 20px);
}

@media (max-width: 768px) {
    .input-output-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md, 15px);
    }
}

.input-section, .output-section {
    background-color: var(--bg-light, #f8f9fa);
    border-radius: var(--border-radius-md, 6px);
    padding: var(--spacing-md, 15px);
    border: 1px solid var(--border-color, #dee2e6);
}

.input-section h4, .output-section h4 {
    margin: 0 0 var(--spacing-sm, 10px) 0;
    padding-bottom: var(--spacing-xs, 5px);
    border-bottom: 1px solid var(--border-color, #dee2e6);
}

.input-section h4 {
    color: var(--info-color, #17a2b8);
}

.output-section h4 {
    color: var(--success-color, #28a745);
}

.json-data {
    background-color: var(--code-bg, #f4f4f4);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-sm, 4px);
    padding: var(--spacing-sm, 10px);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    margin: 0;
}

.no-data {
    padding: var(--spacing-md, 15px);
    text-align: center;
    color: var(--text-muted, #666);
    font-style: italic;
    background-color: var(--bg-lighter, #fafbfc);
    border-radius: var(--border-radius-sm, 4px);
    border: 1px dashed var(--border-color, #dee2e6);
}

.error {
    padding: var(--spacing-md, 15px);
    background-color: var(--danger-bg, #f8d7da);
    color: var(--danger-color, #721c24);
    border: 1px solid var(--danger-border, #f1aeb5);
    border-radius: var(--border-radius-sm, 4px);
}

/* Styles for Content Sections in the new flat layout */
.content-section {
    background-color: var(--bg-light, #f8f9fa); /* Contrasting background with fallback */
    padding: var(--spacing-lg, 20px);
    margin-bottom: var(--spacing-xl, 25px); /* Spacing between sections */
    border-radius: var(--border-radius-lg, 8px);
    box-shadow: var(--shadow-sm, 0 2px 4px rgba(0,0,0,0.05));
}

.content-section h3 { /* Title within each section */
    margin-top: 0;
    margin-bottom: var(--spacing-md, 15px);
    padding-bottom: var(--spacing-sm, 10px);
    border-bottom: 1px solid var(--border-color, #dee2e6);
    display: flex; /* For aligning title and metrics icon */
    justify-content: space-between;
    align-items: center;
}

.content-section .section-body p,
.content-section .section-body ul,
.content-section .section-body ol,
.content-section .section-body table {
    margin-bottom: var(--spacing-md, 15px); /* Consistent bottom margin for elements within section body */
}

.content-section .section-body ul li,
.content-section .section-body ol li {
    margin-bottom: var(--spacing-sm, 8px); /* Spacing for list items */
}
/* End of new Content Section Styles */

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Dim background */
    align-items: center;
    justify-content: center;
}

.modal[aria-hidden="false"] {
    display: flex; /* Shown when aria-hidden is false */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background-color: var(--bg-surface, #ffffff); /* Ensure fallback background */
    color: var(--text-color);
    margin: auto;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px; /* Max width of modal */
    position: relative; /* For positioning close button */
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}
.modal-close:hover {
    color: var(--text-color);
}

.modal-content {
    overflow-y: auto; /* Scrollable content */
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.modal-content h4 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
}

.modal-content li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-color-light);
}
.modal-content li:last-child {
    border-bottom: none;
}

.metric-pass {
    color: var(--success-color, green);
    font-weight: 500;
}

.metric-fail {
    color: var(--error-color, red);
    font-weight: 500;
}

.metric-description {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-top: var(--spacing-xs);
    margin-left: var(--spacing-md);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-md);
    text-align: right;
}

/* Hide sections that are not relevant */
.content-section[hidden] {
    display: none !important;
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: var(--spacing-md) auto;
        max-height: 90vh;
    }
    .modal-title {
        font-size: var(--font-size-md);
    }
}

/* Article Layout with Sidebar */
.article-layout-container {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--spacing-xl, 30px);
    width: 100%;
    /* margin-left: 0; /* Removed override attempts, assuming parent .container is fine */
    /* margin-right: 0; */
}

.wiki-content-main {
    flex-grow: 1; /* Allow main content to grow */
    flex-shrink: 1; /* Allow main content to shrink if needed */
    flex-basis: 70%; /* Suggest it takes up a majority of space initially */
    /* min-width: 0; /* Already there, good for preventing overflow */
    min-width: min(100%, 500px); /* Ensure it has some base width but can shrink */
}

.wiki-sidebar {
    flex-grow: 0; /* Don't allow sidebar to grow beyond its basis/max-width */
    flex-shrink: 0; /* Prevent sidebar from shrinking below its basis/min-width */
    flex-basis: 260px; /* Define a more explicit basis */
    min-width: 220px;
    max-width: 280px;
    /* Adding margin-left to push it right if main content doesn't fill space,
       though with flex-grow on main, this might not be needed if layout works.
       This is more of a fallback if the flex isn't distributing space as expected.
    */
    /* margin-left: auto; */ /* This would push it to the far right if there's space, but might not be what we want if main content should take up slack */
}

#persona-selector-widget {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 100px; /* Adjust based on header height + desired offset */
    padding: var(--spacing-md, 15px);
    background-color: var(--bg-light, #f8f9fa);
    border-radius: var(--border-radius-md, 6px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    border: 1px solid var(--border-color, #e9ecef);
    z-index: 100; /* Ensure it's above other content but below modal */
}

#persona-selector-widget label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm, 8px);
    color: var(--text-color);
}

#persona-selector-widget select {
    width: 100%;
    padding: var(--spacing-sm, 10px);
    border-radius: var(--border-radius-sm, 4px);
    border: 1px solid var(--border-color-dark, #ced4da);
    background-color: var(--bg-surface, #fff);
    font-size: var(--font-size-md, 1rem);
    color: var(--text-color);
    cursor: pointer;
}

/* Collapsible Section Styles */
.content-section .section-header { /* Target the h3 with this class */
    /* display: flex; is already on .content-section h3 from previous diff */
    /* justify-content: space-between; is already on .content-section h3 */
    /* align-items: center; is already on .content-section h3 */
    width: 100%;
    /* Remove bottom border from here if it was on h3 directly, it's on .content-section h3 */
}

.section-toggle-button {
    flex-grow: 1; /* Title takes available space */
    display: flex;
    justify-content: space-between; /* Pushes indicator to the right of title */
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0; /* Remove any default button margins */
    margin-right: var(--spacing-sm, 10px); /* Space before metrics icon */
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    line-height: inherit; /* Ensure consistent line height with h3 */
}

.section-toggle-button:hover .section-title-text,
.section-toggle-button:focus .section-title-text {
    text-decoration: underline;
}

.toggle-indicator {
    margin-left: var(--spacing-sm, 10px);
    font-size: 0.9em; /* Adjusted size */
    transition: transform 0.2s ease-in-out;
    display: inline-block; /* Ensure transform works */
}

.content-section.collapsed .toggle-indicator {
    transform: rotate(-90deg);
}
.content-section:not(.collapsed) .toggle-indicator {
    transform: rotate(0deg);
}

.section-body {
    padding-top: var(--spacing-md, 15px);
    /* overflow: hidden; -- Let content flow naturally, JS handles visibility */
}

.content-section.collapsed .section-body {
    display: none;
}

/* Transparency Modal Specific Styles */
.transparency-modal-container {
    max-width: 1080px !important; /* Expanded by 20% from 900px - using !important to override general modal-container */
    width: 95%;
    max-height: 90vh;
}

.transparency-modal .modal-content {
    padding: 0;
}

/* Prevent background scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
    background-color: var(--bg-light, #f8f9fa);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.tab-button {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    background: none;
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    background-color: var(--bg-surface);
    color: var(--text-color);
}

.tab-button.active {
    background-color: var(--bg-surface);
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Tab Content */
.tab-content {
    min-height: 400px;
    padding: var(--spacing-lg);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Flow Overview Styles */
.flow-diagram {
    background: var(--bg-light, #f8f9fa);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
}

.flow-step {
    display: inline-block;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-sm);
    min-width: 120px;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.flow-step:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flow-step.completed {
    border-color: var(--success-color, #28a745);
    background-color: rgba(40, 167, 69, 0.05);
}

.flow-step.failed {
    border-color: var(--error-color, #dc3545);
    background-color: rgba(220, 53, 69, 0.05);
}

.flow-step-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.flow-step-status {
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.flow-arrow {
    display: inline-block;
    font-size: var(--font-size-lg);
    color: var(--text-light);
    margin: 0 var(--spacing-sm);
    vertical-align: middle;
}

/* Step Details Styles */
.step-selector-container {
    margin-bottom: var(--spacing-lg);
}

.step-selector-container label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.step-selector {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-surface);
    font-size: var(--font-size-md);
    color: var(--text-color);
}

.step-data-container {
    display: grid;
    grid-template-columns: 1fr; /* Stack vertically instead of horizontally */
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Input/Output Container for Transparency Modal */
.input-output-container {
    display: grid;
    grid-template-columns: 1fr; /* Stack vertically - input on top, output below */
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.input-section,
.output-section {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.input-section h4,
.output-section h4 {
    background: var(--bg-light, #f8f9fa);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-color); /* Use primary color for Input Data and Output Data labels */
    margin: 0;
}

.input-section div,
.output-section div {
    padding: var(--spacing-md);
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-surface);
}

.data-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.data-panel-header {
    background: var(--bg-light, #f8f9fa);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-color); /* Use primary color for labels */
}

.data-panel-content {
    padding: var(--spacing-md);
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-surface);
}

.json-display {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

.loading-message {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: var(--spacing-lg);
}

.error-message {
    text-align: center;
    color: var(--error-color, #dc3545);
    padding: var(--spacing-lg);
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: var(--border-radius-sm);
}

/* No data message */
.no-data-message {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: var(--spacing-xl);
    background: var(--bg-light, #f8f9fa);
    border-radius: var(--border-radius-sm);
}

/* Responsive adjustments for transparency modal */
@media (max-width: 768px) {
    .transparency-modal .modal-container {
        width: 98%;
        margin: var(--spacing-sm);
        max-height: 95vh;
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
    
    .step-data-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .tab-content {
        padding: var(--spacing-md);
    }
    
    .flow-diagram {
        padding: var(--spacing-md);
    }
    
    .flow-step {
        display: block;
        margin: var(--spacing-sm) 0;
    }
    
    .flow-arrow {
        display: block;
        transform: rotate(90deg);
        margin: var(--spacing-xs) auto;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .json-display {
        background: #1e1e1e;
        border-color: #444;
        color: #f0f0f0;
    }
    
    .flow-step {
        background: var(--bg-dark, #2d3748);
    }
    
    .flow-step.completed {
        background-color: rgba(40, 167, 69, 0.1);
    }
    
    .flow-step.failed {
        background-color: rgba(220, 53, 69, 0.1);
    }
}

/* Style to prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* End of new Content Section Styles */