/* retoor <retoor@molodetz.nl> */

.workspace-page {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.workspace-title {
    color: var(--text-primary);
    margin: 0;
}

.workspace-muted {
    color: var(--text-secondary);
}

.workspace-state {
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.workspace-meters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin: var(--space-sm) 0;
}

.workspace-meter {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
}

.workspace-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.workspace-tunnel-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-sm) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.workspace-tunnel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
}

.workspace-badge {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    border-radius: var(--radius);
    padding: 0 var(--space-xs);
    font-size: 0.85em;
}

.workspace-badge-active {
    background: var(--success);
    color: var(--bg-card);
}

.workspace-badge-failed {
    background: var(--danger);
    color: var(--bg-card);
}

.workspace-badge-provisioning,
.workspace-badge-pending {
    background: var(--warning);
    color: var(--bg-card);
}

.workspace-error {
    color: var(--danger);
}

.workspace-tunnel-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.workspace-suspended {
    border-left: 3px solid var(--danger);
}

.workspace-flag-critical {
    border-left: 3px solid var(--danger);
}

.workspace-flag-warn {
    border-left: 3px solid var(--warning);
}

.workspace-flag-info {
    border-left: 3px solid var(--text-secondary);
}

.workspace-editor-heading {
    margin: var(--space-lg) 0 var(--space-xs);
    color: var(--text-primary);
}

.workspace-editor-restart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius);
    background: var(--overlay-light);
    color: var(--text-primary);
}

.workspace-editor-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-sm);
    list-style: none;
    margin: 0 0 var(--space-md);
    padding: 0;
}

.workspace-editor-summary li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
}

.workspace-editor-summary span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.workspace-editor-summary strong {
    color: var(--text-primary);
    text-transform: capitalize;
}

.workspace-editor-summary em {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.workspace-editor-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-sm);
}

.workspace-editor-form label {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.workspace-editor-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--space-sm);
}

.workspace-editor-reset {
    margin-top: var(--space-sm);
}

@media (max-width: 768px) {
    .workspace-editor-summary,
    .workspace-editor-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .workspace-meters {
        flex-direction: column;
    }
}

.workspace-state {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.workspace-badge-ready {
    background: var(--success);
    color: var(--bg-card);
}

.workspace-badge-starting,
.workspace-badge-stopping {
    background: var(--warning);
    color: var(--bg-card);
}

.workspace-badge-crashed,
.workspace-badge-suspended {
    background: var(--danger);
    color: var(--bg-card);
}

.workspace-phase-view {
    display: contents;
}

.workspace-phase-view[hidden],
.workspace-phase-hint[hidden] {
    display: none;
}

.workspace-phase-hint {
    margin: var(--space-xs) 0 0;
}
