/**
 * yatexml MathML Styles
 *
 * This CSS file provides necessary styles for proper rendering of MathML
 * generated by yatexml, particularly for alignment environments like
 * \begin{align}, \begin{aligned}, \begin{gather}, and \begin{gathered}.
 *
 * Include this file in your HTML:
 *   <link rel="stylesheet" href="yatexml.css">
 *
 * Or copy these styles into your existing CSS.
 */

/* Array cell justification for Firefox & WebKit */
.tml-right {
  text-align: right;
}

.tml-left {
  text-align: left;
}

.tml-center {
  text-align: center;
}

/* Chromium-specific overrides for better alignment */
@supports (not (-webkit-backdrop-filter: blur(1px))) and (not (-moz-appearance: none)) {
  .tml-right {
    text-align: -webkit-right;
  }

  .tml-left {
    text-align: -webkit-left;
  }
}

/* Equation numbering styles */
.equation-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1em 0;
  position: relative;
  width: 100%;
}

.equation-content {
  flex: 1;
  text-align: center;
}

.equation-number {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1em;
  color: inherit;
}

/* Equation references */
a.eqref {
  text-decoration: none;
  color: inherit;
}

a.eqref:hover {
  text-decoration: underline;
}

.eqref-error {
  color: red;
}
