/* DataMint Demo Window Styles — Warm Palette */

/* Workspace Layout for Landing Page Integration */
.demo-workspace-integrated {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    gap: 16px;
    max-width: 100%;
    margin: 0 0 20px 0;
}

/* Window Layout */
.window {
    background: var(--paper);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--sand);
}

.data-window {
    flex: 1;
    min-height: 300px;
}

.inspector-window {
    flex: 1;
    min-height: 300px;
    transition: opacity 0.3s ease;
}

.inspector-window.no-selection {
    opacity: 0.85;
}

/* Window Titles */
.window-title {
    background: var(--parchment);
    padding: 12px 16px;
    border-bottom: 1px solid var(--sand);
    font-size: 13px;
    font-weight: 600;
    color: var(--stone-500);
    font-family: var(--sans);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-name {
    flex: 1;
}

/* Window Content */
.window-content {
    padding: 16px;
    flex: 1;
    overflow: auto;
    min-height: 0;
}

/* Grid Container */
.grid-container {
    overflow-x: auto;
    transition: opacity 0.3s ease;
}

.grid-container.transitioning {
    opacity: 0.5;
    pointer-events: none;
}

.spreadsheet-grid {
    display: grid;
    grid-template-columns: 200px repeat(5, 1fr);
    gap: 0;
    border: 1px solid var(--sand);
    border-radius: 6px;
    overflow: hidden;
    min-width: 850px;
}

.grid-header {
    background: var(--parchment);
    padding: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--charcoal);
    font-family: var(--sans);
    border-right: 1px solid var(--sand);
    border-bottom: 2px solid var(--sand);
    text-align: center;
    position: sticky;
    top: 0;
}

.grid-header.document-col {
    text-align: left;
    background: var(--mint-700);
    color: #FFFFFF;
}

.controlled-type {
    font-size: 9px;
    font-weight: 500;
    color: var(--stone-500);
    background: var(--cream);
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 4px;
    display: inline-block;
    font-family: var(--mono);
}

.grid-cell {
    background: var(--paper);
    padding: 6px 8px;
    font-family: var(--mono);
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-right: 1px solid var(--sand);
    border-bottom: 1px solid var(--sand);
    min-height: 40px;
    display: flex;
    align-items: center;
    color: var(--charcoal);
}

.grid-cell.document-name {
    background: var(--cream);
    font-weight: 500;
    cursor: default;
    color: var(--stone-500);
    font-family: var(--sans);
}

.grid-cell.data-cell:hover {
    background: var(--mint-50);
}

.grid-cell.high-confidence {
    background: var(--mint-50);
}

.grid-cell.medium-confidence {
    background: var(--mint-50);
}

.grid-cell.low-confidence {
    background: var(--amber-bg);
}

.grid-cell.selected {
    background: var(--mint-100);
    box-shadow: inset 0 0 0 2px var(--mint-700);
}

/* Data Type Indicators */
.data-type-badge {
    display: inline-block;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 4px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.8;
    font-family: var(--mono);
}

.data-type-categorical {
    background: var(--mint-100);
    color: var(--mint-900);
}

.data-type-float {
    background: #f3e5f5;
    color: #7b1fa2;
}

.data-type-percentage {
    background: var(--mint-50);
    color: var(--mint-900);
}

.data-type-currency {
    background: var(--amber-bg);
    color: var(--amber);
}

.data-type-duration {
    background: #fce4ec;
    color: #c2185b;
}

/* Placeholder Content */
.placeholder-content {
    text-align: center;
    padding: 60px 20px;
    color: var(--stone-500);
}

.placeholder-icon {
    font-size: 24px;
    margin-bottom: 12px;
}

.placeholder-text {
    font-size: 14px;
    font-family: var(--serif);
    font-style: italic;
    line-height: 1.4;
}

/* Evidence Content Styles */
.evidence-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.evidence-column {
    min-width: 0;
}

.section {
    margin-bottom: 20px;
}

.section-label {
    font-weight: 600;
    font-size: 11px;
    color: var(--stone-500);
    font-family: var(--sans);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.section-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--charcoal);
}

.answer-value {
    font-family: var(--mono);
    background: var(--cream);
    padding: 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 11px;
    border: 1px solid var(--sand);
}

.confidence-score {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    font-family: var(--mono);
}

.confidence-score.high {
    background: var(--mint-100);
    color: var(--mint-900);
}

.confidence-score.medium {
    background: var(--amber-bg);
    color: var(--amber);
}

.confidence-score.low {
    background: #fff9c4;
    color: #b45309;
}

.evidence-text {
    background: var(--cream);
    padding: 12px;
    border-radius: 4px;
    border-left: 2px solid var(--mint-700);
    font-family: var(--serif);
    font-style: italic;
    color: var(--stone-700);
    line-height: 1.5;
    font-size: 13px;
}

.quotes-list {
    list-style: none;
    padding: 0;
}

.quotes-list li {
    background: var(--mint-50);
    margin: 6px 0;
    padding: 8px 10px;
    border-radius: 3px;
    font-size: 13px;
    font-family: var(--serif);
    border-left: 3px solid var(--mint-700);
    line-height: 1.5;
    color: var(--charcoal);
}

.reasoning-steps {
    list-style: none;
    padding: 0;
}

.reasoning-steps li {
    margin: 8px 0;
    padding: 10px;
    background: var(--cream);
    border-radius: 3px;
    border-left: 3px solid var(--stone-500);
    font-size: 12px;
    font-family: var(--mono);
    line-height: 1.4;
}

.reasoning-steps li strong {
    color: var(--charcoal);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-family: var(--sans);
}

.assumptions-list {
    list-style: none;
    padding: 0;
}

.assumptions-list li {
    margin: 4px 0;
    padding: 6px 8px;
    background: var(--amber-bg);
    border-radius: 3px;
    font-size: 10px;
    font-family: var(--mono);
    border-left: 2px solid var(--amber);
    line-height: 1.3;
}

/* Use Case Tabs Integration */
.use-case-tabs {
    background: var(--parchment);
    border-bottom: 1px solid var(--sand);
    padding: 20px 20px 0;
    overflow-x: auto;
    border-radius: 8px 8px 0 0;
}

.tabs-container {
    display: flex;
    gap: 8px;
    min-width: min-content;
    justify-content: center;
    border-bottom: 2px solid var(--sand);
    margin-bottom: 16px;
}

.tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--sans);
    color: var(--stone-500);
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
}

.tab:hover {
    color: var(--mint-700);
}

.tab.active {
    color: var(--mint-700);
    border-bottom-color: var(--mint-700);
}

.use-case-description {
    background: var(--paper);
    padding: 16px 20px;
    border-bottom: 1px solid var(--sand);
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.description-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--charcoal);
    font-family: var(--serif);
}

.description-text {
    font-size: 14px;
    color: var(--stone-500);
    line-height: 1.5;
    font-family: var(--serif);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(45, 123, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(45, 123, 107, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(45, 123, 107, 0);
    }
}

/* Monospace for AI-extracted content (robot voice) */
.grid-cell.data-cell,
.answer-value,
.reasoning-steps li,
.assumptions-list li {
    font-family: var(--mono);
}

/* Serif for paper-sourced content (human voice) */
.evidence-text,
.quotes-list li {
    font-family: var(--serif);
}

/* Keep document names and headers in regular font */
.grid-cell.document-name,
.grid-header,
.section-label,
.window-title,
.description-title {
    font-family: var(--sans);
}

/* Override description-title to serif */
.description-title {
    font-family: var(--serif);
}

/* ==========================================
   BLOOM DEMO
   ========================================== */

/* Mode Toggle (Minting / Bloom) */
.demo-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--parchment);
    border-radius: 8px;
    padding: 4px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.mode-btn {
    flex: 1;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--stone-500);
}

.mode-btn.active {
    background: var(--paper);
    color: var(--mint-700);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mode-btn:hover:not(.active) {
    color: var(--charcoal);
}

/* Bloom workspace: side-by-side */
.bloom-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 500px;
}

/* Bloom element type tabs */
.bloom-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.bloom-tab {
    background: var(--paper);
    border: 1px solid var(--sand);
    border-radius: 6px;
    padding: 8px 20px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--stone-500);
    cursor: pointer;
    transition: all 0.2s;
}

.bloom-tab:hover {
    border-color: var(--mint-700);
    color: var(--mint-700);
}

.bloom-tab.active {
    background: var(--mint-700);
    border-color: var(--mint-700);
    color: #FFFFFF;
}

/* Mock PDF panel */
.bloom-pdf-panel {
    background: var(--white);
    border: 1px solid var(--sand);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bloom-pdf-header {
    background: var(--parchment);
    padding: 10px 16px;
    border-bottom: 1px solid var(--sand);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--stone-500);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bloom-pdf-body {
    padding: 24px 28px;
    flex: 1;
    overflow-y: auto;
    font-family: var(--serif);
    font-size: 14px;
    color: var(--charcoal);
    line-height: 1.7;
    background: var(--white);
}

/* PDF mock content elements */
.pdf-heading {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.pdf-subheading {
    font-family: var(--serif);
    font-size: 12px;
    font-style: italic;
    color: var(--stone-500);
    margin-bottom: 16px;
}

.pdf-body {
    font-family: var(--serif);
    font-size: 13px;
    color: var(--charcoal);
    margin-bottom: 12px;
    line-height: 1.7;
}

.pdf-caption {
    font-family: var(--serif);
    font-size: 11px;
    color: var(--stone-500);
    margin-top: 12px;
    line-height: 1.5;
    font-style: italic;
}

.pdf-mock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    font-family: var(--serif);
    margin: 8px 0;
}

.pdf-mock-table th {
    background: var(--parchment);
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--sand);
    font-size: 11px;
    color: var(--charcoal);
}

.pdf-mock-table td {
    padding: 5px 8px;
    border: 1px solid var(--sand);
    color: var(--charcoal);
    font-size: 11px;
}

.pdf-equation-block {
    text-align: center;
    font-family: var(--serif);
    font-size: 18px;
    font-style: italic;
    padding: 20px 0;
    color: var(--charcoal);
    letter-spacing: 0.5px;
}

.pdf-figure-placeholder {
    background: var(--cream);
    border: 1px dashed var(--sand);
    border-radius: 6px;
    padding: 40px 24px;
    text-align: center;
    font-family: var(--serif);
    font-size: 12px;
    color: var(--stone-500);
    font-style: italic;
    line-height: 1.6;
    margin: 12px 0;
}

/* Bloom elements panel (right side) */
.bloom-elements-panel {
    background: var(--paper);
    border: 1px solid var(--sand);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bloom-elements-header {
    background: var(--parchment);
    padding: 10px 16px;
    border-bottom: 1px solid var(--sand);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--stone-500);
}

.bloom-elements-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

/* Element card */
.bloom-element-card {
    border: 1px solid var(--sand);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--white);
}

.bloom-element-card:last-child {
    margin-bottom: 0;
}

.bloom-element-card-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: var(--cream);
    border-bottom: 1px solid var(--sand);
}

.bloom-element-card-header:hover {
    background: var(--parchment);
}

.bloom-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.bloom-element-title {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal);
    flex: 1;
}

.bloom-element-toggle {
    font-size: 12px;
    color: var(--stone-400);
    transition: transform 0.2s;
}

.bloom-element-toggle.open {
    transform: rotate(90deg);
}

.bloom-element-content {
    padding: 16px;
}

/* Extracted table inside element card */
.bloom-extracted-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono);
    font-size: 11px;
    margin-bottom: 12px;
}

.bloom-extracted-table th {
    background: var(--mint-50);
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--sand);
    color: var(--mint-900);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bloom-extracted-table td {
    padding: 5px 8px;
    border: 1px solid var(--sand);
    color: var(--charcoal);
    font-size: 11px;
}

.bloom-extracted-table tr:nth-child(even) td {
    background: var(--cream);
}

/* Figure extraction content */
.bloom-figure-field {
    margin-bottom: 12px;
}

.bloom-figure-label {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--stone-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.bloom-figure-value {
    font-family: var(--serif);
    font-size: 13px;
    color: var(--charcoal);
    line-height: 1.5;
}

.bloom-figure-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bloom-figure-list li {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--charcoal);
    padding: 4px 0 4px 16px;
    position: relative;
    line-height: 1.4;
}

.bloom-figure-list li:before {
    content: "\2022";
    position: absolute;
    left: 2px;
    color: var(--mint-700);
}

/* Equation extraction content */
.bloom-equation-display {
    text-align: center;
    font-family: var(--mono);
    font-size: 16px;
    padding: 16px;
    background: var(--cream);
    border-radius: 6px;
    margin-bottom: 12px;
    color: var(--charcoal);
    border: 1px solid var(--sand);
}

.bloom-variable-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bloom-variable-list li {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--charcoal);
    padding: 4px 0;
    border-bottom: 1px solid var(--cream);
    line-height: 1.4;
}

.bloom-variable-list li:last-child {
    border-bottom: none;
}

.bloom-note {
    font-family: var(--serif);
    font-size: 12px;
    color: var(--stone-500);
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--sand);
}

.bloom-footnotes {
    font-family: var(--serif);
    font-size: 11px;
    color: var(--stone-500);
    margin-top: 8px;
    line-height: 1.5;
}

/* Multi-level table headers */
.bloom-header-group th {
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid var(--sand);
    color: var(--charcoal);
}

.bloom-empty-header {
    border-bottom: none !important;
}

/* Row group headers */
.bloom-row-group-header td {
    background: var(--parchment);
    padding: 6px 8px;
    font-family: var(--serif);
    font-size: 12px;
    color: var(--charcoal);
    border-top: 1px solid var(--sand);
}

.bloom-row-label {
    padding-left: 16px !important;
    color: var(--stone-500);
    font-size: 11px;
}

.bloom-significant {
    color: var(--mint-900);
    font-weight: 600;
}

/* Flow diagram nodes */
.bloom-flow-nodes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.bloom-flow-level {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.bloom-flow-arrow {
    width: 100%;
    text-align: center;
    color: var(--stone-400);
    font-size: 14px;
    line-height: 1;
}

.bloom-flow-node {
    background: var(--paper);
    border: 1px solid var(--sand);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--charcoal);
    line-height: 1.3;
    text-align: center;
    min-width: 80px;
}

.bloom-flow-level[data-level="0"] .bloom-flow-node {
    background: var(--mint-50, #F2FAF8);
    border-color: var(--mint-300, #A8E1D4);
    font-weight: 500;
}

.bloom-flow-level[data-level="2"] .bloom-flow-node {
    background: var(--cream);
    font-weight: 500;
}

.bloom-flow-level[data-level="3"] .bloom-flow-node {
    font-size: 10px;
    padding: 4px 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .demo-workspace-integrated {
        height: auto;
        gap: 12px;
        margin: 10px 0;
    }

    .data-window, .inspector-window {
        min-height: 250px;
    }

    .window-title {
        padding: 10px 12px;
        font-size: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .window-content {
        padding: 12px;
    }

    .spreadsheet-grid {
        min-width: 750px;
        grid-template-columns: 160px repeat(5, 1fr);
    }

    .grid-cell {
        padding: 6px;
        font-size: 10px;
        min-height: 36px;
    }

    .use-case-tabs {
        padding: 16px 16px 0;
    }

    .tab {
        padding: 12px 16px;
        font-size: 12px;
        min-width: 80px;
    }

    .evidence-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bloom-workspace {
        grid-template-columns: 1fr;
    }
}
