/* The on-page list of a form's mistakes (form-errors.js), above the button the roper pressed. The colours fall
   back when the theme's tokens are not there. */
.rt-form-errors {
    margin: 1rem 0; padding: 1rem 1.25rem; text-align: left;
    background: #fff5f5; border: 1px solid #f0c4c6; border-left: 4px solid var(--rt-red, #c2272c);
    color: var(--rt-black, #050506); font-size: .95rem; line-height: 1.45;
}
.rt-form-errors:focus { outline: none; }   /* focused only so screen readers start here; nothing to type in */
.rt-form-errors .rt-form-errors-h { margin: 0 0 .5rem; font-weight: 700; }
.rt-form-errors ul { margin: 0; padding-left: 1.2rem; }
.rt-form-errors li + li { margin-top: .3rem; }
.rt-form-errors a { color: var(--rt-red, #a31f24); font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }
.rt-form-errors a:hover { color: var(--rt-black, #050506); }

/* FormErrors.note(): a short message along the bottom of the screen in place of an alert(), above the phone checkout
   bar (.rt-checkout-bar) and the RHR portal's bottom tabs when they are there */
.rt-note {
    position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1030;
    display: flex; align-items: center; gap: .75rem; width: max-content; max-width: min(32rem, calc(100vw - 32px));
    padding: .8rem .6rem .8rem 1.1rem; background: var(--rt-black, #111113); color: #fff;
    border-left: 4px solid var(--rt-red, #c2272c); box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .55);
    font-size: .95rem; line-height: 1.4;
    opacity: 0; visibility: hidden; transform: translate(-50%, 12px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.rt-note.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.rt-note .rt-note-x { flex: none; width: 36px; height: 36px; padding: 0; background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: .75; }
.rt-note .rt-note-x:hover, .rt-note .rt-note-x:focus-visible { opacity: 1; }
body:has(.rt-checkout-bar) .rt-note { bottom: calc(60px + 16px + env(safe-area-inset-bottom)); }
@media (min-width: 1200px) { body:has(.rt-checkout-bar) .rt-note { bottom: calc(16px + env(safe-area-inset-bottom)); } }
@media (max-width: 768px) { body.has-tabs .rt-note { bottom: calc(64px + 16px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .rt-note, .rt-note.is-on { transition: none; } }
