/* THANHTULAB: approved highlighted article links (only allowlisted classes survive PHP sanitizing). */
.article-body a.rich-link-box-green,
.article-body a.rich-link-box-red {
  display: inline-flex;
  align-items: center;
  gap: .42em;
  max-width: 100%;
  margin: .18em .12em;
  padding: .32em .78em;
  border: 1px solid;
  border-radius: .62em;
  font-weight: 750;
  line-height: 1.55;
  text-decoration: none !important;
  overflow-wrap: anywhere;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.article-body a.rich-link-box-green {
  color: #176d38 !important;
  border-color: #afd9b9;
  background: linear-gradient(135deg, #f0faf2 0%, #e6f6e9 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.article-body a.rich-link-box-red {
  color: #b9232d !important;
  border-color: #f0b9bc;
  background: linear-gradient(135deg, #fff5f4 0%, #ffebeb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.article-body a.rich-link-box-green:hover,
.article-body a.rich-link-box-green:focus-visible {
  border-color: #72bd84;
  background: #e0f4e4;
  box-shadow: 0 3px 10px rgba(35,131,75,.12);
  transform: translateY(-1px);
}
.article-body a.rich-link-box-red:hover,
.article-body a.rich-link-box-red:focus-visible {
  border-color: #e78c91;
  background: #ffe2e3;
  box-shadow: 0 3px 10px rgba(202,43,51,.11);
  transform: translateY(-1px);
}
.article-body a.rich-link-box-green:focus-visible,
.article-body a.rich-link-box-red:focus-visible { outline: 3px solid rgba(35,131,75,.22); outline-offset: 2px; }

/* Preview inside the admin rich-text editor. */
.rich-editor-surface a.rich-link-box-green,
.rich-editor-surface a.rich-link-box-red {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: .18em .12em;
  padding: .28em .7em;
  border: 1px solid;
  border-radius: .58em;
  font-weight: 750;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.rich-editor-surface a.rich-link-box-green { color: #176d38; border-color: #afd9b9; background: #eaf7ed; }
.rich-editor-surface a.rich-link-box-red { color: #b9232d; border-color: #f0b9bc; background: #fff0ef; }
