/* TKT-000441: production-drop intake dialog. The scrim is opaque enough to
   keep the page legible and the card uses the shared glass material tokens. */
.edash-intake-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 90);
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--mat-scrim, rgba(18, 30, 34, .5));
}

.edash-intake-overlay[hidden] { display: none; }

.edash-intake-dialog {
    position: relative;
    width: min(620px, 100%);
    max-height: min(760px, calc(100dvh - 32px));
    overflow: auto;
    padding: 32px;
    color: var(--ink, #25343f);
    background: var(--mat-thick, rgba(255, 255, 255, .94));
    border: 1px solid var(--glass-edge, rgba(255, 255, 255, .55));
    border-radius: var(--r-card, 14px);
    box-shadow: var(--mat-shadow-3, 0 24px 60px rgba(15, 106, 113, .28));
}

.edash-intake-dialog h2 {
    max-width: calc(100% - 38px);
    margin: 0;
    color: var(--primary, #0f6a71);
    font-size: var(--type-page-title-size, 24px);
    line-height: 1.2;
}

.edash-intake-summary {
    margin: 10px 0 24px;
    color: var(--type-ink-soft, #5b6b73);
    line-height: 1.5;
}

.edash-intake-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--r-ctl, 10px);
    color: var(--ink, #25343f);
    background: transparent;
    font-size: var(--type-page-title-size, 24px);
    line-height: 1;
    cursor: pointer;
}

.edash-intake-close:hover { background: var(--primary-soft, #e4f1f1); }
.edash-intake-close:focus-visible,
.edash-intake-silent:focus-visible,
.edash-intake-segment:has(input:focus-visible) {
    outline: 3px solid rgba(15, 106, 113, .35);
    outline-offset: 2px;
}

.edash-intake-question {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.edash-intake-question legend {
    margin-bottom: 8px;
    color: var(--ink, #25343f);
    font-size: var(--type-body-size, 15px);
    font-weight: 700;
}

.edash-intake-segments {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.edash-intake-question:nth-of-type(2) .edash-intake-segments {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.edash-intake-segment {
    min-width: 0;
    padding: 11px 8px;
    color: var(--ink, #25343f);
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e7edee);
    border-radius: var(--r-ctl, 10px);
    text-align: center;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.edash-intake-segment input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.edash-intake-segment:has(input:checked) {
    color: #fff;
    background: var(--primary, #0f6a71);
    border-color: var(--primary, #0f6a71);
}

.edash-intake-segment span {
    display: block;
    font-size: var(--type-body-size, 15px);
    line-height: 1.25;
}

.edash-intake-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.edash-intake-actions .btn { flex: 1; }

.edash-intake-actions .btn-secondary {
    color: var(--ink, #25343f);
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e7edee);
}

.edash-intake-message {
    min-height: 1.4em;
    margin: 0 0 8px;
    color: var(--danger, #d64545);
    font-size: var(--type-body-size, 15px);
}

.edash-intake-message:empty { display: none; }

.edash-intake-silent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 4px 0;
    color: var(--type-ink-soft, #5b6b73);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: var(--type-caption-size, 13px);
    cursor: pointer;
}

.edash-intake-silent[aria-pressed="true"] { color: var(--primary, #0f6a71); }

@media (max-width: 600px) {
    .edash-intake-dialog { padding: 28px 20px 20px; }
    .edash-intake-segments,
    .edash-intake-question:nth-of-type(2) .edash-intake-segments {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .edash-intake-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .edash-intake-segment { transition: none; }
}

@media (forced-colors: active) {
    .edash-intake-overlay { background: Canvas; }
    .edash-intake-dialog { color: CanvasText; background: Canvas; border-color: CanvasText; }
    .edash-intake-segment:has(input:checked) { color: HighlightText; background: Highlight; border-color: Highlight; }
}
