/* Shared appearance; modules retain only placement and visibility rules. */
:is(.ui-notice, .form-message, .order-payment-notice, .receipt-refund__summary,
    .receipt-refund__test-notice, .receipt-job__message, .terminal-connect__message,
    .terminal-management__notice, .order-promo-message, .order-delivery-found__warning,
    .notice),
.order-payment-section > .module-empty {
    --notice-background: #fff5dc;
    --notice-color: #000000;
    --notice-border: #f2ddb0;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid var(--notice-border);
    border-radius: 6px;
    background: var(--notice-background);
    color: var(--notice-color);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
    box-shadow: none;
}

:is(.form-message, .order-promo-message, .order-delivery-found__warning,
    .ui-notice--error, .notice--error, .terminal-connect__message--error) {
    --notice-background: #fef2f2;
    --notice-color: #b91c1c;
    --notice-border: #fecaca;
}

:is(.form-message--success, .ui-notice--success, .notice--success,
    .terminal-connect__message--success, .order-promo-message.is-success) {
    --notice-background: #ecfdf5;
    --notice-color: #166534;
    --notice-border: #bbf7d0;
}

:is(.form-message--info, .ui-notice--info, .order-options-notice,
    .receipt-refund__test-notice, .order-delivery-found__warning--free-delivery) {
    --notice-background: #fff5dc;
    --notice-color: #000000;
    --notice-border: #f2ddb0;
}

:is(.ui-notice, .form-message, .order-payment-notice, .receipt-refund__summary,
    .receipt-refund__test-notice, .receipt-job__message, .terminal-connect__message,
    .terminal-management__notice, .order-promo-message, .order-delivery-found__warning,
    .notice) :is(strong, b) {
    font-weight: inherit;
}

.receipt-job__message > p {
    margin: 0;
}

/* Native hidden attributes must win over legacy visible message hooks. */
.form-message[hidden], .order-promo-message[hidden], .ui-notice[hidden] {
    display: none;
}
