/* --- Global Status Pane --- */

#status-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
    overflow: hidden;
    gap: 1rem;
}

/* --- Top Section: 3 Columns --- */
#status-main-view {
    flex-grow: 1; /* Takes up remaining space */
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    min-height: 0; /* Important for scroll */
    overflow: hidden;
}

.status-column {
    background-color: var(--pico-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0.5rem;
}

.status-column h3 {
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pico-muted-border-color);
    font-size: 1.1em;
    text-align: center;
    color: var(--pico-contrast);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Lists */
.status-list {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}

.status-list p {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid var(--pico-muted-border-color);
    margin: 0;
    font-size: 0.9em;
}

/* Status Colors */
.status-list .value-ally, .status-list .value-alive { color: #4CAF50; font-weight: bold; }
.status-list .value-enemy, .status-list .value-dead { color: #F44336; font-weight: bold; }
.status-list .value-imprisoned { color: #FFC107; font-weight: bold; }

/* --- Bottom Section: Footer --- */
#status-footer {
    height: 250px; /* Fixed height for log area */
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 2fr 1fr; /* Log gets more space than controls */
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

/* Log Container */
#verbose-log-container {
    display: flex;
    flex-direction: column;
    background-color: var(--pico-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    overflow: hidden;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid var(--pico-muted-border-color);
    background-color: var(--pico-card-background-color);
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--pico-muted-color);
    font-size: 0.9em;
}
.tab-button.active {
    background-color: var(--pico-primary-focus);
    color: var(--pico-color);
    font-weight: bold;
}

.log-content {
    display: none;
    padding: 0.5rem;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.85em;
    flex-grow: 1;
}
.log-content.active { display: block; }

#verbose-log-readable p { margin: 0 0 4px 0; border-bottom: 1px solid #333; }

/* Controls */
#export-controls-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--pico-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    text-align: center;
}

#export-controls-container h4 { margin: 0; font-size: 1em; color: var(--pico-muted-color); }

.history-buttons { display: flex; gap: 10px; }
.history-button { flex: 1; padding: 8px; background-color: #444; color: white; border: 1px solid #666; cursor: pointer; }
.history-button:disabled { opacity: 0.5; cursor: not-allowed; }
.history-button:hover:not(:disabled) { background-color: #555; }

.apply-button {
    width: 100%;
    padding: 10px;
    background-color: var(--pico-primary);
    color: var(--pico-primary-inverse);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.apply-button:hover { background-color: var(--pico-primary-hover); }