/*
 * Notice — <x-notice>: a persistent message in the content of a page, in the
 * tone of App\Enums\Ui\NoticeTone (info, warning, danger, success).
 * NOT scoped under .view-shell: the layout renders it in <main> (the
 * read-only banner of the all-contexts mode), so it is linked globally by
 * layouts/page.blade.php. Look: resources/design-system/components/Notice.
 * Used by: layouts/nav/context-readonly-banner, the UI kit page (admin/ui-kit),
 * the form entry screen (admin/form-entry/show), the process gate of the
 * car card forms section (admin/car/form/forms) and the tow truck trips: the
 * list, the edit form, the load panel and the close dialog of the trip card
 * (admin/tow-truck-trip) and the term picker of the wash order form and of
 * the wash order dialog of the vehicle card (admin/wash-order/form/slot-picker),
 * the mapping warnings of the insurance commission statement import
 * (admin/insurance-commission-statement/mapping), the offer dialog of an
 * insurance deal (admin/insurance-offer/modal) and the policy screens: the
 * registration dialog, the form and its pending document, the section dialog
 * and the termination of the policy card (admin/insurance-policy).
 */

.notice {
    display: flex;
    align-items: flex-start;
    gap: var(--mdm-space-3);
    padding: var(--mdm-space-3) var(--mdm-space-4);
    border: 1px solid var(--mdm-border);
    border-radius: var(--mdm-radius-md);
    background: var(--mdm-surface);
    color: var(--mdm-text);
    font-size: var(--mdm-fs-body);
    line-height: var(--mdm-lh-body);
}

.notice__icon {
    margin-top: 3px;
    color: var(--mdm-text-mut);
}

.notice__body {
    flex: 1;
    min-width: 0;
}

.notice__title {
    display: block;
    font-weight: var(--mdm-fw-body-strong);
}

.notice__text {
    margin-top: 2px;
    font-size: var(--mdm-fs-control);
    line-height: var(--mdm-lh-control);
}

.notice__text:empty { display: none; }

/* Plain links of the notice; a button in the action slot keeps its own look. */
.notice__text a, .notice__action a:not(.btn) { color: inherit; font-weight: 600; text-decoration: underline; }

.notice__action {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: center;
}

.notice--info { background: var(--mdm-info-soft); border-color: var(--mdm-info); color: var(--mdm-info-text); }
.notice--info .notice__icon { color: var(--mdm-info); }
.notice--warning { background: var(--mdm-warning-soft); border-color: var(--mdm-warning); color: var(--mdm-warning-text); }
.notice--warning .notice__icon { color: var(--mdm-warning); }
.notice--danger { background: var(--mdm-danger-soft); border-color: var(--mdm-danger); color: var(--mdm-danger-text); }
.notice--danger .notice__icon { color: var(--mdm-danger); }
.notice--success { background: var(--mdm-success-soft); border-color: var(--mdm-success); color: var(--mdm-success-text); }
.notice--success .notice__icon { color: var(--mdm-success); }
