/* ---------------------------------------------------------------------------
   Record dialogs (RecordDialog): the form names the record, so the bar above
   it is only room for the close button - no second copy of the title.
   --------------------------------------------------------------------------- */
.mud-dialog.record-dialog .mud-dialog-title {
    min-height: 36px;
    padding: 0;
}

.mud-dialog.record-dialog .mud-dialog-title .mud-button-close {
    top: 4px;
    right: 8px;
    padding: 6px;
}

/* As tall as the window allows: a record is read and saved here, and every line of height is a line of form. */
.mud-dialog.record-dialog {
    max-height: calc(100dvh - 32px);
}

/* Kept for screen readers; the form shows the name itself. */
.record-dialog-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Confirmation dialogs (ConfirmPrompt): every confirmation asks the same way -
   an icon, the question, and what it means.
   --------------------------------------------------------------------------- */
.mud-dialog:has(.sm-confirm) {
    width: min(500px, calc(100vw - 32px));
    max-width: min(500px, calc(100vw - 32px));
}

.mud-dialog:has(.sm-confirm) .mud-dialog-content {
    padding: 8px 24px 4px;
}

.mud-dialog:has(.sm-confirm) .mud-dialog-actions {
    padding: 12px 24px 20px;
    gap: 8px;
}

.sm-confirm {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 4px 0;
}

.sm-confirm-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

.sm-confirm-icon .mud-icon-root {
    font-size: 1.5rem;
}

.sm-confirm-danger .sm-confirm-icon {
    color: var(--mud-palette-error);
    background: color-mix(in srgb, var(--mud-palette-error) 12%, transparent);
}

.sm-confirm-body {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2px;
}

.sm-confirm-text {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--mud-palette-text-primary);
    overflow-wrap: anywhere;
}

.sm-confirm-note {
    margin-top: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--mud-palette-text-secondary);
}
