/* RUH V58 — consistent readable text in all dialogs and popup forms */
:where(#modalOverlay,.modal-overlay,.adm-modal,.adm-dialog,.ruh-modal-open,.ruh-notice-modal,.pwa-dialog) {
  color:#172033 !important;
  color-scheme:light;
}
:where(#modalOverlay,.modal-overlay) .modal,
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) {
  background:#fff !important;
  color:#172033 !important;
  border:1px solid #dbe3ef !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(h1,h2,h3,h4,h5,b,strong,legend),
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) :where(h1,h2,h3,h4,h5,b,strong,legend) {
  color:#172033 !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(p,span,small,em,li,dd,dt,div:not(.btn):not(.modal__close)),
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) :where(p,span,small,em,li,dd,dt) {
  text-shadow:none !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(p.desc,.desc,.help,.hint,small),
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) :where(p,small,.desc,.help,.hint) {
  color:#53627a !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(label,.rp-field span,.form-check,.rp-check,.ruh-book-contact-consent),
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) label {
  color:#344258 !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(input:not([type=checkbox]):not([type=radio]),textarea,select),
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) :where(input:not([type=checkbox]):not([type=radio]),textarea,select) {
  background:#fff !important;
  color:#172033 !important;
  border-color:#cbd5e1 !important;
  -webkit-text-fill-color:#172033 !important;
  opacity:1 !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(input,textarea)::placeholder,
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) :where(input,textarea)::placeholder {
  color:#7b879a !important;
  -webkit-text-fill-color:#7b879a !important;
  opacity:1 !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(input,textarea,select):focus,
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) :where(input,textarea,select):focus {
  border-color:#6366f1 !important;
  box-shadow:0 0 0 3px rgba(99,102,241,.15) !important;
  outline:0 !important;
}
:where(#modalOverlay,.modal-overlay) .modal :where(a,.link),
:where(.adm-modal,.adm-dialog,.pwa-dialog__inner) a { color:#3730a3; }
:where(#modalOverlay,.modal-overlay) .modal .modal__close { color:#53627a !important;background:#f1f5f9 !important; }
:where(#modalOverlay,.modal-overlay) .modal .modal__close:hover { color:#172033 !important;background:#e2e8f0 !important; }
:where(#modalOverlay,.modal-overlay) .modal :where(.rp-table,.adm-t) { color:#263247 !important; }
:where(#modalOverlay,.modal-overlay) .modal :where(.rp-table th,.adm-t th) { background:#eef2f8 !important;color:#344258 !important; }
:where(#modalOverlay,.modal-overlay) .modal :where(.rp-table td,.adm-t td) { color:#263247 !important; }
:where(#modalOverlay,.modal-overlay) .modal :where(input[type=checkbox],input[type=radio]) { accent-color:#4f46e5; }
:where(#modalOverlay,.modal-overlay) .modal :where(.btn--primary,.btn--success,.btn--danger) { color:#fff !important; }
@media(max-width:600px){
  #modalOverlay.modal-overlay { padding:10px !important;align-items:flex-end !important; }
  #modalOverlay .modal { width:100% !important;max-width:none !important;max-height:92dvh !important;padding:22px 16px !important;border-radius:20px 20px 14px 14px !important; }
  #modalOverlay .modal .modal__actions { flex-wrap:wrap; }
  #modalOverlay .modal .modal__actions .btn { min-width:0; }
}
