Files
astrolabe/src/app/components/ModalShell.module.css
T

96 lines
2.1 KiB
CSS

/* Feature-modal shell (docs/architecture/03 → Layer 3). Sits below the confirm
layer (z 1000) so a discard prompt can appear above an open modal. */
.backdrop {
position: fixed;
inset: 0;
z-index: 900;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-5);
background: rgb(0 0 0 / 0.5);
}
.modal {
display: flex;
flex-direction: column;
min-height: 0;
background: var(--layer-01);
border: var(--border-width) solid var(--border);
border-radius: var(--radius);
box-shadow: 0 2px 12px rgb(0 0 0 / 0.3);
}
/* Large: the two-pane managers (Datasets). Definite height so inner panes scroll. */
.large {
width: min(960px, 94vw);
height: min(700px, 88vh);
}
/* Small: single-form modals (Extract). Grows with content up to a cap. */
.small {
width: min(560px, 92vw);
max-height: 88vh;
}
.header {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-4);
height: var(--header-height);
padding: 0 var(--space-5);
border-bottom: var(--border-width) solid var(--border);
}
.title {
margin: 0;
font-size: 16px;
font-weight: 600;
color: var(--text);
}
/* The title is only a programmatic focus target (large-manager initial focus);
it shouldn't paint a ring the way a keyboard-reached control would. */
.title:focus {
outline: none;
}
.close {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
background: none;
color: var(--text-secondary);
font-size: 22px;
line-height: 1;
cursor: pointer;
border-radius: var(--radius);
transition: background var(--dur-fast) var(--ease);
}
.close:hover {
background: var(--layer-02);
color: var(--text);
}
.close:focus-visible {
outline: 2px solid var(--focus);
outline-offset: 2px;
}
/* The modal body. Background steps to --bg so the panes read as the work surface
against the --layer-01 chrome. Fills the remaining height; inner content scrolls. */
.body {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
background: var(--bg);
}