/* manager.modal.fix.css
   Fix: modal should be opaque in white theme (vars like --card may be undefined here).
   Also keeps overlay above header.
*/

/* Overlay always above header */
.mgr-modal-backdrop{
  z-index: 99999 !important;
}

/* Darken background; in white theme make it a bit stronger */
html[data-theme="white"] .mgr-modal-backdrop{
  background: rgba(0,0,0,0.70) !important;
}
html[data-theme="black"] .mgr-modal-backdrop{
  background: rgba(0,0,0,0.55) !important;
}

/* MAIN FIX: modal card must NOT be transparent in white theme */
html[data-theme="white"] .mgr-modal{
  background: #ffffff !important;
  color: #111111 !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35) !important;
}

/* Ensure inner text respects the card color in white theme */
html[data-theme="white"] .mgr-modal__header h2,
html[data-theme="white"] .mgr-modal__close,
html[data-theme="white"] .mgr-field label,
html[data-theme="white"] .mgr-field small,
html[data-theme="white"] .mgr-actions button{
  color: #111111 !important;
}

/* Inputs inside modal */
html[data-theme="white"] .mgr-modal input[type="text"],
html[data-theme="white"] .mgr-modal input[type="tel"],
html[data-theme="white"] .mgr-modal input[type="email"]{
  background: #ffffff !important;
  color: #111111 !important;
  border: 1px solid rgba(0,0,0,0.22) !important;
}

/* Secondary muted text */
html[data-theme="white"] .mgr-modal .muted{
  color: rgba(0,0,0,0.62) !important;
}
/* === Dark theme: manager edit modal text fix === */
html[data-theme="black"] .mgr-modal {
  color: #e6e8ec;
}

html[data-theme="black"] .mgr-modal__header h2,
html[data-theme="black"] .mgr-modal__close,
html[data-theme="black"] .mgr-field label {
  color: #f1f3f6;
}

html[data-theme="black"] .mgr-field small {
  color: rgba(241, 243, 246, 0.75);
}
