/*
 * MELANIUM — site-wide high-contrast feedback and status design.
 * Corrects legacy cream notices inheriting pale lettering from the dark theme.
 * Front end only; does not change WordPress admin or event/approval logic.
 */
body.mp-site {
  --mel-feedback-text: #fff3f5;
  --mel-feedback-link: #ffe0e7;
  --mel-feedback-border: #ad7584;
}

/* General informational notices, including legacy .mel-notice messages. */
body.mp-site .mel-notice,
body.mp-site .notice-success,
body.mp-site .notice-error,
body.mp-site .notice-warning,
body.mp-site .notice-info,
body.mp-site .mel-notice-success,
body.mp-site .mel-notice-error {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 16px 20px;
  background: #2b2028 !important;
  color: var(--mel-feedback-text) !important;
  border: 1px solid #8a6571;
  border-left: 5px solid #e18a9a;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  opacity: 1;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Explicit semantic contrast; colour never carries the meaning alone. */
body.mp-site .notice-success,
body.mp-site .mel-notice-success {
  background: #21392f !important;
  color: #f0fff5 !important;
  border-color: #65a582;
  border-left-color: #74df9f;
}
body.mp-site .notice-error,
body.mp-site .mel-notice-error {
  background: #43222b !important;
  color: #fff1f3 !important;
  border-color: #bd6575;
  border-left-color: #ff8796;
}
body.mp-site .notice-warning {
  background: #3c2d20 !important;
  color: #fff4df !important;
  border-color: #bd9558;
  border-left-color: #f3bd6d;
}
body.mp-site .notice-info {
  background: #203342 !important;
  color: #e9f7ff !important;
  border-color: #648daa;
  border-left-color: #8bc6ed;
}

/* More-specific existing headings, paragraphs, and .workspace-content p
 * previously won the cascade and became invisible on pale notice backgrounds. */
body.mp-site .mel-notice :is(p,span,small,strong,b,em,li,label,h2,h3,h4),
body.mp-site .notice-success :is(p,span,small,strong,b,em,li,label,h2,h3,h4),
body.mp-site .notice-error :is(p,span,small,strong,b,em,li,label,h2,h3,h4),
body.mp-site .notice-warning :is(p,span,small,strong,b,em,li,label,h2,h3,h4),
body.mp-site .notice-info :is(p,span,small,strong,b,em,li,label,h2,h3,h4),
body.mp-site .mel-notice-success :is(p,span,small,strong,b,em,li,label,h2,h3,h4),
body.mp-site .mel-notice-error :is(p,span,small,strong,b,em,li,label,h2,h3,h4) {
  color: inherit !important;
  opacity: 1 !important;
}
body.mp-site :is(.mel-notice,.notice-success,.notice-error,.notice-warning,.notice-info,.mel-notice-success,.mel-notice-error) p {
  font-size: inherit;
  line-height: inherit;
  margin: 5px 0;
}
body.mp-site :is(.mel-notice,.notice-success,.notice-error,.notice-warning,.notice-info,.mel-notice-success,.mel-notice-error) a {
  color: var(--mel-feedback-link) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}
body.mp-site :is(.mel-notice,.notice-success,.notice-error,.notice-warning,.notice-info,.mel-notice-success,.mel-notice-error) a:hover {
  color: #ffffff !important;
}

/* Legacy status chips were also beige, with pale text inherited from the dark theme.
   Keep clear readable chips without changing status data or the colour of buttons. */
body.mp-site :is(.mel-pill,.status-pill) {
  background: #422b34;
  border-color: #a87583;
  color: #fff4f5;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 800;
}

/* Pale avatar/initial placeholders need dark initials. Images are unaffected. */
body.mp-site .portrait-initial {
  color: #362027;
}
:root:not(#mp-unused) body.mp-site .spotlight .spotlight-photo > .portrait-initial {
  color: #362027 !important;
}

/* Keyboard skip link has a white background even on the dark site. */
body.mp-site .skip-link {
  color: #25181d;
  background: #ffffff;
  border: 2px solid #e4485d;
  font-weight: 800;
}

/* Mobile: readable notifications without pushing beyond content edges. */
@media(max-width:640px) {
  body.mp-site :is(.mel-notice,.notice-success,.notice-error,.notice-warning,.notice-info,.mel-notice-success,.mel-notice-error) {
    padding: 14px 15px;
    font-size: 14px;
    line-height: 1.6;
  }
}
