:root {
    --workspace-window-border: #8fb0c8;
    --workspace-window-header-bg: linear-gradient(180deg, #10395e 0%, #bdd8ef 100%);
    --workspace-window-header-text: #ffffff;
    --workspace-window-body-bg: #ffffff;
    --workspace-window-shadow: 0 8px 24px rgba(12, 35, 55, 0.2);
}

.workspace-window {
    position: fixed;
    top: clamp(3.2rem, 11vh, 8rem);
    left: clamp(0.75rem, 14vw, 20rem);
    width: min(calc(100vw - 1.5rem), 680px);
    min-width: 320px;
    min-height: 140px;
    max-height: 78vh;
    background: var(--workspace-window-body-bg);
    border: 1px solid var(--workspace-window-border);
    border-radius: 8px;
    box-shadow: var(--workspace-window-shadow);
    z-index: 1205;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.workspace-window--resizable {
    resize: both;
}

.workspace-window-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    background: var(--workspace-window-header-bg);
    color: var(--workspace-window-header-text);
    border-bottom: 1px solid var(--workspace-window-border);
    border-radius: 8px 8px 0 0;
    padding: 0.4rem 0.6rem;
    cursor: grab;
    flex-shrink: 0;
    user-select: none;
}

.workspace-window-header:active {
    cursor: grabbing;
}

.workspace-window-title {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(14, 34, 52, 0.55);
}

.workspace-window-close {
    margin: 0 0 0 auto !important;
    border: 0;
    background: transparent;
    color: var(--workspace-window-header-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 3px;
    width: 1.15rem;
    height: 1.15rem;
    line-height: 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(14, 34, 52, 0.65);
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.workspace-window-close.icon_button {
    margin: 0 0 0 auto !important;
    background: transparent;
    border: 0;
    padding: 0;
}

.workspace-window-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.workspace-window-body {
    padding: 0.6rem;
    color: #1f3040;
    overflow: auto;
    overflow-x: hidden;
    flex: 1;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

.workspace-window-body pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.workspace-patient-hash-window .workspace-window-body > div {
    width: 100%;
    max-width: 100%;
}

.workspace-patient-hash-window input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .workspace-window {
        width: min(calc(100vw - 0.8rem), 520px);
        max-height: 68vh;
        top: 0.4rem;
        left: 0.4rem;
        min-width: 290px;
    }
}
