/* Native dialog above the search; original form nodes retain every binding. */
@layer redicoReadability {
  html.rxmax-quote-open { overflow: hidden !important; }
  html body dialog#rxmax-quote-dialog {
    --rxq-bg: #fbfaf7; --rxq-text: #242428; --rxq-muted: #67636b; --rxq-line: #d7d2cc; --rxq-field: #fff;
    width: min(720px, calc(100% - 24px)) !important; max-width: 720px !important;
    max-height: calc(100dvh - 32px) !important; margin: auto !important; padding: 0 !important;
    border: 1px solid var(--rxq-line) !important; border-radius: 24px !important;
    background: var(--rxq-bg) !important; color: var(--rxq-text) !important;
    box-shadow: 0 32px 100px #0005 !important; overflow: auto !important; overscroll-behavior: contain;
    font-family: Inter, Arial, sans-serif !important;
  }
  html[data-theme="dark"] body dialog#rxmax-quote-dialog,
  html[data-rx-theme="dark"] body dialog#rxmax-quote-dialog {
    --rxq-bg: #202126; --rxq-text: #f5f3ef; --rxq-muted: #c4c0c7; --rxq-line: #454249; --rxq-field: #292a30;
  }
  #rxmax-quote-dialog::backdrop { background: #121218a6; backdrop-filter: blur(6px); }
  html body #rxmax-quote-dialog .rxmax-quote-top {
    display: flex !important; align-items: flex-start !important; justify-content: space-between !important; gap: 16px !important;
    padding: 24px 28px 20px !important; border-bottom: 1px solid var(--rxq-line) !important;
    background: var(--rxq-bg) !important;
  }
  html body #rxmax-quote-dialog .rxmax-quote-kicker { font-size: 11px !important; letter-spacing: .1em !important; color: var(--rxq-muted) !important; }
  html body #rxmax-quote-dialog #rxmax-quote-title { margin: 8px 0 !important; color: var(--rxq-text) !important; font-size: clamp(23px,4vw,30px) !important; line-height: 1.15 !important; letter-spacing: -.025em !important; }
  html body #rxmax-quote-dialog .rxmax-quote-top p { margin: 0 !important; color: var(--rxq-muted) !important; font-size: 14px !important; line-height: 1.5 !important; }
  html body #rxmax-quote-dialog .rxmax-quote-close { flex: 0 0 44px !important; width: 44px !important; height: 44px !important; padding: 0 !important; border: 1px solid var(--rxq-line) !important; border-radius: 12px !important; background: transparent !important; color: var(--rxq-text) !important; font: 28px/1 Arial,sans-serif !important; cursor: pointer; }
  html body #rxmax-quote-dialog .rxmax-quote-body { padding: 22px 28px 28px !important; }
  html body #rxmax-quote-dialog .rxmax-quote-source { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--rxq-text) !important; }
  html body #rxmax-quote-dialog .rdx-quote-heading { display: none !important; }
  html body #rxmax-quote-dialog .rdx-attachment { position:relative !important; display:flex !important; align-items:center !important; gap:9px !important; min-height:44px !important; padding:10px 12px !important; border:1px dashed var(--rxq-line) !important; border-radius:9px !important; color:var(--rxq-text) !important; font-size:12px !important; cursor:pointer; }
  html body #rxmax-quote-dialog .rdx-attachment svg { width:16px !important; height:16px !important; color:#b52336 !important; }
  html body #rxmax-quote-dialog .rdx-attachment small { margin-left:auto !important; font-size:11px !important; color:var(--rxq-muted) !important; }
  html body #rxmax-quote-dialog#rxmax-quote-dialog .rdx-attachment input[type="file"] { position:absolute !important; inset:0 !important; width:100% !important; height:100% !important; opacity:0 !important; cursor:pointer; }
  html body #rxmax-quote-dialog .rdx-attachment:focus-within { outline:2px solid #b52336 !important; outline-offset:2px !important; }
  html body #rxmax-quote-dialog :is(label,.rd-field__label,.rd-consent-copy,.rd-consent-copy span,.rd-consent-copy a,.rd-privacy-note,.rd-upload-hint,.rdx-form-status,.rx-ux-form__context) { color: var(--rxq-muted) !important; }
  html body #rxmax-quote-dialog#rxmax-quote-dialog :is(input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="radio"]),textarea,select) { box-sizing: border-box !important; max-width: 100% !important; background: var(--rxq-field) !important; color: var(--rxq-text) !important; border: 1px solid var(--rxq-line) !important; border-radius: 9px !important; min-height:44px !important; padding:9px 11px !important; font-size: 16px !important; line-height:1.4 !important; }
  html body #rxmax-quote-dialog :is(.rxmax-quote-loading,.rxmax-quote-unavailable) { color: var(--rxq-text) !important; font-size: 16px !important; line-height: 1.6 !important; }
  html body #rxmax-quote-dialog .rxmax-quote-unavailable a { display: block !important; padding: 8px 0 !important; color: var(--rxq-text) !important; text-decoration: underline !important; }
  html body #rxmax-quote-dialog .rxmax-quote-close:focus-visible { outline: 3px solid #b52336 !important; outline-offset: 3px !important; }
  @media(max-width:599px) {
    html body #rxmax-quote-dialog .rdx-field-grid { grid-template-columns:1fr !important; }
    html body dialog#rxmax-quote-dialog { border-radius: 18px !important; max-height: calc(100dvh - 16px) !important; }
    html body #rxmax-quote-dialog .rxmax-quote-top { padding: 20px 16px 16px !important; }
    html body #rxmax-quote-dialog .rxmax-quote-body { padding: 18px 16px 22px !important; }
  }
}
@media(prefers-reduced-motion:no-preference) { #rxmax-quote-dialog[open] { animation: rxmaxQuoteIn .2s ease-out; } @keyframes rxmaxQuoteIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } }
