/* Tier Fuel & Enhancement Manual capture terminal */
.doctrine-popup {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2.5vw, 2rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 0ms linear 300ms;
}

.doctrine-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 360ms ease;
}

.doctrine-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.doctrine-popup__terminal {
  position: relative;
  width: min(64rem, 100%);
  max-height: min(52rem, calc(100vh - 2rem));
  overflow: auto;
  padding: clamp(1.6rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3.4rem) clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(238, 241, 244, 0.68);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.004)),
    rgba(1, 1, 2, 0.985);
  box-shadow:
    0 0 0 5px rgba(0, 0, 0, 0.94),
    0 0 0 6px rgba(238, 241, 244, 0.22),
    0 0 44px rgba(255, 255, 255, 0.1),
    0 40px 100px rgba(0, 0, 0, 0.9);
  color: rgba(247, 248, 249, 0.94);
  transform: scaleY(0.04) scaleX(0.96);
  transform-origin: center;
  isolation: isolate;
}

.doctrine-popup__terminal::before,
.doctrine-popup__terminal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.doctrine-popup__terminal::before {
  inset: 0.65rem;
  border: 1px solid rgba(238, 241, 244, 0.16);
}

.doctrine-popup__terminal::after {
  z-index: 4;
  top: -4rem;
  left: 0;
  width: 100%;
  height: 4rem;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.07), transparent);
}

.doctrine-popup.is-open .doctrine-popup__terminal {
  animation: doctrine-materialize 720ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.doctrine-popup.is-open .doctrine-popup__terminal::after {
  animation: doctrine-scan 800ms ease-out 120ms forwards;
}

.doctrine-popup__corner {
  position: absolute;
  z-index: 5;
  width: 2rem;
  height: 2rem;
  border-color: rgba(255, 255, 255, 0.92);
  border-style: solid;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.45));
}

.doctrine-popup__corner--tl { top: -1px; left: -1px; border-width: 3px 0 0 3px; }
.doctrine-popup__corner--tr { top: -1px; right: -1px; border-width: 3px 3px 0 0; }
.doctrine-popup__corner--bl { bottom: -1px; left: -1px; border-width: 0 0 3px 3px; }
.doctrine-popup__corner--br { right: -1px; bottom: -1px; border-width: 0 3px 3px 0; }

.doctrine-popup__close {
  position: absolute;
  z-index: 7;
  top: 1.1rem;
  right: 1.2rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font: 300 1.15rem/1 var(--font-sans);
  cursor: pointer;
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.doctrine-popup__close:hover,
.doctrine-popup__close:focus-visible {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  transform: scale(1.08);
  outline: none;
}

.doctrine-popup__header,
.doctrine-popup__footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(2rem, 1fr) auto minmax(2rem, 1fr);
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.7rem);
}

.doctrine-popup__header {
  padding: 0 3rem;
  opacity: 0;
}

.doctrine-popup.is-open .doctrine-popup__header {
  animation: doctrine-fade-in 500ms ease 460ms forwards;
}

.doctrine-popup__header p,
.doctrine-popup__footer p {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  text-align: center;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.doctrine-popup__header p {
  font-size: clamp(0.72rem, 1.5vw, 1rem);
  white-space: nowrap;
}

.doctrine-popup__header-line,
.doctrine-popup__footer span {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.72));
}

.doctrine-popup__header-line:last-child,
.doctrine-popup__footer span:last-child {
  transform: scaleX(-1);
}

.doctrine-popup__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) minmax(19rem, 1.18fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(1.8rem, 4vw, 3.25rem);
}

.doctrine-popup__cover-wrap {
  position: relative;
  justify-self: center;
  width: min(100%, 20.5rem);
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateX(-1.2rem);
}

.doctrine-popup__cover-wrap::before {
  content: "";
  position: absolute;
  inset: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.doctrine-popup.is-open .doctrine-popup__cover-wrap {
  animation: doctrine-cover-in 600ms cubic-bezier(0.16, 1, 0.3, 1) 600ms forwards;
}

.doctrine-popup__cover {
  width: 100%;
  height: auto;
}

.doctrine-popup__copy,
.doctrine-popup__success {
  opacity: 0;
  transform: translateY(0.7rem);
}

.doctrine-popup.is-open .doctrine-popup__copy,
.doctrine-popup.is-open .doctrine-popup__success {
  animation: doctrine-copy-in 560ms ease 780ms forwards;
}

.doctrine-popup__copy h2,
.doctrine-popup__success h2 {
  margin: 0;
  max-width: 12ch;
  color: #f4f4f2;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.015em;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.12);
}

.doctrine-popup__subtitle,
.doctrine-popup__support,
.doctrine-popup__success-kicker {
  font-family: var(--font-serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.doctrine-popup__subtitle {
  margin: 1.15rem 0 0;
  color: rgba(238, 239, 240, 0.74);
  font-size: clamp(0.72rem, 1.25vw, 0.9rem);
}

.doctrine-popup__divider {
  width: 100%;
  height: 1px;
  margin: 1.4rem 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.08));
}

.doctrine-popup__description {
  margin: 0;
  max-width: 42ch;
  color: rgba(238, 239, 240, 0.76);
  font-size: clamp(0.93rem, 1.45vw, 1.05rem);
  line-height: 1.75;
}

.doctrine-popup__support {
  margin: 1.5rem 0 1.35rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.75rem, 1.3vw, 0.93rem);
  line-height: 1.7;
}

.doctrine-popup__form {
  display: grid;
  gap: 0.75rem;
}

.doctrine-popup__input {
  width: 100%;
  min-height: 3.7rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.018);
  color: rgba(255, 255, 255, 0.96);
  padding: 0.85rem 1.15rem;
  font: 300 1rem/1.2 var(--font-sans);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.doctrine-popup__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.doctrine-popup__input:hover,
.doctrine-popup__input:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.07);
}

.doctrine-popup__input[aria-invalid="true"] {
  border-color: rgba(255, 176, 176, 0.76);
}

.doctrine-popup__error {
  min-height: 1.15rem;
  margin: -0.2rem 0 0;
  color: rgba(255, 180, 180, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.doctrine-popup__submit,
.doctrine-popup__success-close {
  position: relative;
  min-height: 3.65rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-serif);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 17px rgba(255, 255, 255, 0.08), inset 0 0 17px rgba(255, 255, 255, 0.025);
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.doctrine-popup.is-open .doctrine-popup__submit {
  animation: doctrine-button-pulse 2.8s ease-in-out 1.6s infinite;
}

.doctrine-popup__submit:hover,
.doctrine-popup__submit:focus-visible,
.doctrine-popup__success-close:hover,
.doctrine-popup__success-close:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  color: rgba(0, 0, 0, 0.94);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.24);
  outline: none;
}

.doctrine-popup__submit:disabled {
  cursor: wait;
  opacity: 0.62;
  animation: none;
}

.doctrine-popup__success {
  align-self: center;
}

.doctrine-popup__success[hidden],
.doctrine-popup__copy[hidden] {
  display: none;
}

.doctrine-popup__success h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 3rem);
}

.doctrine-popup__success-kicker {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.doctrine-popup__success > p:not(.doctrine-popup__success-kicker) {
  margin: 1.3rem 0 1.7rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

.doctrine-popup__success-close {
  width: min(100%, 18rem);
}

.doctrine-popup__footer p {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.62rem, 1.2vw, 0.8rem);
  white-space: nowrap;
}

body.doctrine-popup-open {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes doctrine-materialize {
  0% { opacity: 0; transform: scaleY(0.04) scaleX(0.96); filter: brightness(1.8); }
  18% { opacity: 1; transform: scaleY(1.025) scaleX(1.004); }
  36% { transform: scaleY(0.985) scaleX(1); filter: brightness(1.12); }
  46% { opacity: 0.74; }
  52% { opacity: 1; }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

@keyframes doctrine-scan {
  from { top: -4rem; opacity: 0; }
  12% { opacity: 1; }
  to { top: calc(100% + 4rem); opacity: 0; }
}

@keyframes doctrine-fade-in {
  from { opacity: 0; transform: translateY(-0.45rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes doctrine-cover-in {
  from { opacity: 0; transform: translateX(-1.2rem); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes doctrine-copy-in {
  from { opacity: 0; transform: translateY(0.7rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes doctrine-button-pulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 255, 255, 0.07), inset 0 0 15px rgba(255, 255, 255, 0.02); }
  50% { box-shadow: 0 0 24px rgba(255, 255, 255, 0.16), inset 0 0 18px rgba(255, 255, 255, 0.045); }
}

@media (max-width: 720px) {
  .doctrine-popup {
    padding: 0.55rem;
  }

  .doctrine-popup__terminal {
    max-height: calc(100vh - 1.1rem);
    padding: 3.5rem 1.15rem 1.25rem;
  }

  .doctrine-popup__header {
    padding: 0 1.5rem;
  }

  .doctrine-popup__header p {
    letter-spacing: 0.21em;
  }

  .doctrine-popup__content {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding: 1.65rem 0 1.7rem;
  }

  .doctrine-popup__cover-wrap {
    width: min(9.5rem, 45vw);
    transform: translateY(0.75rem);
  }

  .doctrine-popup.is-open .doctrine-popup__cover-wrap {
    animation-name: doctrine-copy-in;
  }

  .doctrine-popup__copy,
  .doctrine-popup__success {
    text-align: center;
  }

  .doctrine-popup__copy h2,
  .doctrine-popup__success h2,
  .doctrine-popup__description {
    margin-left: auto;
    margin-right: auto;
  }

  .doctrine-popup__copy h2 {
    max-width: 16ch;
    font-size: clamp(1.7rem, 8vw, 2.35rem);
  }

  .doctrine-popup__subtitle {
    margin-top: 0.75rem;
  }

  .doctrine-popup__divider {
    margin: 1rem 0;
  }

  .doctrine-popup__description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .doctrine-popup__support {
    margin: 1rem 0;
  }

  .doctrine-popup__input,
  .doctrine-popup__submit {
    min-height: 3.3rem;
  }

  .doctrine-popup__footer {
    gap: 0.7rem;
  }

  .doctrine-popup__footer p {
    letter-spacing: 0.18em;
  }
}

@media (max-width: 430px) {
  .doctrine-popup__header-line {
    display: none;
  }

  .doctrine-popup__header {
    grid-template-columns: 1fr;
  }

  .doctrine-popup__footer {
    grid-template-columns: 1.5rem 1fr 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doctrine-popup,
  .doctrine-popup *,
  .doctrine-popup *::before,
  .doctrine-popup *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
