/* Presentation only. Original labels, controls, hints and layout stay in place. */
@media screen {
  .rfl-position { position: relative; }
  .rfl-source.rfl-generated {
    position: absolute !important;
    inset: 0 auto auto 0;
    pointer-events: none;
  }
  .rfl-source {
    position: relative !important;
    overflow: visible !important;
    color: transparent !important;
    text-shadow: none !important;
  }
  .rfl-source > :not(.rfl-caption, button, a, input, select, textarea, small, .hint, .help, [data-type-role="support"], .field-error, .req-error, [role="alert"]):not(:has(button, a, input, select, textarea)) {
    opacity: 0 !important;
  }
  .rfl-source > :is(small, .hint, .help, [data-type-role="support"]) { color: var(--text-muted, #635c6c); }
  .rfl-caption {
    position: absolute;
    inset: 0 auto auto 0;
    display: block;
    width: max-content;
    max-width: var(--rfl-width);
    padding: 0 4px;
    margin: 0;
    border: 0;
    font-family: inherit;
    font-size: var(--rfl-font);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    color: var(--rfl-ink);
    pointer-events: none;
    transform-origin: left top;
    transform: translate(var(--rfl-x), var(--rfl-rest-y));
    transition: transform 220ms cubic-bezier(.2, 0, 0, 1), color 220ms ease;
    isolation: isolate;
    z-index: 2;
  }
  .rfl-caption::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(var(--rfl-outer) 50%, var(--rfl-inner) 50%);
    opacity: 0;
    transition: opacity 220ms ease;
    z-index: -1;
  }
  .rfl-caption::after { content: attr(data-rfl-label); }
  .rfl-caption[hidden] { display: none !important; }
  /* Compact: the hidden copy of the label keeps only ~10px above the box, enough
     for the caption that sits on the outline. */
  .rfl-source > .rfl-control { margin-top: -14px !important; }
  /* A visually hidden label leaves no line above the box, so the box keeps its place;
     pulling it up would overlap the row above when filters wrap on phones. */
  .rfl-source:has(> :is(.ow-sr, .sr-only, .visually-hidden) + .rfl-control) > .rfl-control { margin-top: 0 !important; }
  label.rfl-source:not(:has(input, select, textarea)) { margin-bottom: -14px !important; }
  .rfl-host:has(.rfl-control:is(:focus, :autofill, :not(:placeholder-shown))) .rfl-caption,
  .rfl-caption[data-rfl-raised] {
    transform: translate(var(--rfl-x), var(--rfl-float-y)) scale(.875);
  }
  .rfl-host:has(.rfl-control:is(:focus, :autofill, :not(:placeholder-shown))) .rfl-caption::before,
  .rfl-caption[data-rfl-raised]::before { opacity: 1; }
  /* While the field is in use the label's text fades so the entry reads first (preview upgrade-118,
     Option C). Only the colour fades: the ::before patch stays solid, so the border never shows through. */
  .rfl-host:has(.rfl-control:focus) .rfl-caption,
  .rfl-caption[data-rfl-focus] { color: color-mix(in srgb, var(--text-muted, #52616C) 55%, transparent); }
  .rfl-host:has(.rfl-control:is([aria-invalid="true"], .is-invalid, :user-invalid)) .rfl-caption,
  .rfl-caption[data-rfl-invalid] { color: var(--danger, #d8293e); }
  .rfl-control::placeholder { opacity: 0 !important; }
  .rfl-control:focus::placeholder { opacity: 1 !important; }
  /* A placeholder that only repeats the raised label stays hidden. */
  .rfl-control[data-rfl-repeat]:focus::placeholder { opacity: 0 !important; }
  /* Entered text reads as a value, not a label: regular weight. */
  .rfl-control:is(input, textarea) { font-weight: 400; }
  .rfl-control {
    min-height: 44px;
    color: var(--rfl-value-ink);
    transition: border-color 220ms ease;
  }
  .rfl-control:focus {
    border-color: var(--brand-purple, var(--interaction, #7b58ea)) !important;
    outline: none !important;
    box-shadow: none !important;
  }
  .rfl-control:is([aria-invalid="true"], .is-invalid, :user-invalid) { border-color: var(--danger, #d8293e) !important; }
  /* An info button written in the label sits inside the box at its right end, so it does not
     hold an empty row open above the field. */
  .rfl-source:not(:has(.rfl-control)) > .ow-info-i { position: absolute !important; top: calc(100% - 18px); right: 0; margin: 0; z-index: 3; }
  .rfl-host:has(> .rfl-source > .ow-info-i) > .rfl-control { padding-right: 44px !important; }
  @media (pointer: coarse) { .rfl-source:not(:has(.rfl-control)) > .ow-info-i { top: calc(100% - 14px); } }
  @media (prefers-reduced-motion: reduce) {
    .rfl-caption, .rfl-caption::before, .rfl-control { transition: none; }
  }
}
