/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Form Builder: contenteditable placeholder */
.fb-empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}

/* Inline math used by the Application Form builder and rendered questions. */
.math-script {
  display: inline-block;
  font-size: 0.7em;
  line-height: 1;
  min-width: 0.48em;
}

sup.math-script {
  vertical-align: 0.18em;
  transform: none;
}

sub.math-script {
  vertical-align: -0.12em;
  transform: none;
}

.math-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin: 0 0.08em;
  font-family: inherit;
  font-weight: inherit;
}

.math-fraction {
  align-items: stretch;
  flex-direction: column;
  justify-content: center;
  min-width: 1.1em;
  font-size: 0.92em;
  font-family: inherit;
  font-weight: inherit;
  line-height: 1.05;
  vertical-align: middle;
}

.math-fraction-num,
.math-fraction-den {
  display: block;
  min-width: 0.7em;
  padding: 0 0.16em;
  text-align: center;
  box-sizing: border-box;
  font-family: inherit;
  font-weight: inherit;
}

.math-fraction-den {
  border-top: 1px solid currentColor;
}

.math-root,
.dcg-mq-sqrt-container {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  font-size: 1em;
  line-height: 1;
}

.math-root-symbol,
.dcg-mq-sqrt-prefix {
  display: inline-block;
  position: absolute;
  top: 1px;
  bottom: 0.12em;
  left: 0.06em;
  width: 1em;
  margin: 0;
  overflow: hidden;
  color: currentColor;
  line-height: 1;
  pointer-events: none;
}

.math-root-symbol svg,
.dcg-mq-sqrt-prefix svg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.12em;
  display: block;
  width: calc(100% + 0.12em);
  height: 100%;
  fill: currentColor;
}

.math-root-body,
.dcg-mq-sqrt-stem {
  display: inline-block;
  min-width: 0.7em;
  margin-top: 1px;
  margin-left: 0.98em;
  margin-right: 0.1em;
  padding: 0.3em 0.2em 0 0.18em;
  border-top: 1px solid currentColor;
  font-family: inherit;
  font-weight: inherit;
  line-height: 1.05;
}

.math-fraction .math-root {
  vertical-align: -0.04em;
}

.math-fraction .math-root-symbol {
  top: 0.08em;
  bottom: 0.18em;
  left: 0.08em;
  width: 0.9em;
}

.math-fraction .math-root-symbol svg {
  left: -0.1em;
  width: calc(100% + 0.1em);
}

.math-fraction .math-root-body {
  margin-left: 0.88em;
  padding-top: 0.22em;
  padding-left: 0.12em;
  padding-right: 0.16em;
}

.math-root .math-script {
  font-size: 0.64em;
}

.math-root sup.math-script {
  vertical-align: 0.08em;
}

.application-question-label div,
.application-question-label p {
  display: block;
}

.application-question-label {
  line-height: 1.55;
}

.application-question-label .math-inline {
  vertical-align: -0.08em;
}

.application-question-label .math-fraction {
  vertical-align: middle;
}

[contenteditable="true"] .math-script,
[contenteditable="true"] .math-fraction-num,
[contenteditable="true"] .math-fraction-den,
[contenteditable="true"] .math-root-body {
  border-radius: 0.2rem;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #a5b4fc;
}

[contenteditable="true"] .math-active {
  background: #dbeafe;
  box-shadow: inset 0 0 0 1.5px #3b82f6, 0 0 0 2px rgba(59, 130, 246, 0.14);
}

[contenteditable="true"] .math-script {
  padding: 0 0.22em;
}

[contenteditable="true"] .math-fraction-num,
[contenteditable="true"] .math-fraction-den,
[contenteditable="true"] .math-root-body {
  min-width: 0.95em;
}

[contenteditable="true"] .math-fraction-den,
[contenteditable="true"] .math-root-body {
  box-shadow: inset 0 0 0 1px #a5b4fc, 0 -1px 0 currentColor;
}

/* Trix: hide attachment metadata (filename + size) and progress bar leftover.
   With Tailwind base, the default Trix caption strip renders as an empty
   thick white bar — hiding it keeps images clean. (.attachment__* classes
   are Trix-specific so no risk of collision.) */
.attachment__metadata-container,
.attachment__metadata,
.attachment__name,
.attachment__size {
  display: none !important;
}

/* Also remove the persistent progress bar that some Trix versions leave
   visible at 100% after upload completes. */
.attachment__progress {
  display: none !important;
}
