/* ==========================================================================
   Texaco — Rebate application modal
   Self-contained styles. Prefixed with .txr- to avoid clashing with site CSS.
   ========================================================================== */

.txr-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0s linear 0.32s;
  -webkit-font-smoothing: antialiased;
}

.txr-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s ease;
}

.txr-modal *,
.txr-modal *::before,
.txr-modal *::after {
  box-sizing: border-box;
}

.txr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.64);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.txr-dialog {
  position: relative;
  display: flex;
  width: min(960px, 100%);
  max-height: calc(100vh - 56px);
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.42s cubic-bezier(0.22, 0.68, 0.3, 1);
  outline: none;
}

.txr-modal.is-open .txr-dialog {
  transform: none;
}

/* --------------------------------------------------------------------------
   Left brand panel
   -------------------------------------------------------------------------- */

.txr-visual {
  position: relative;
  flex: 0 0 40%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  padding: 44px 40px 34px;
  color: #fff;
  background: linear-gradient(155deg, #f14a3c 0%, #ee3124 46%, #c21d14 100%);
  overflow: hidden;
}

.txr-visual__star {
  position: absolute;
  top: -74px;
  right: -92px;
  width: 340px;
  height: 340px;
  opacity: 0.1;
  transform: rotate(14deg);
  pointer-events: none;
}

.txr-visual__star img {
  display: block;
  width: 100%;
  height: 100%;
}

.txr-eyebrow {
  position: relative;
  margin: 0 0 18px;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.txr-headline {
  position: relative;
  margin: 0 0 14px;
  font-family: "gotham-narrow-bold", "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}

.txr-sub {
  position: relative;
  margin: 0 0 28px;
  max-width: 300px;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.txr-ticket {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 0 30px;
  transform: rotate(-2.5deg);
  filter: drop-shadow(0 16px 24px rgba(80, 0, 0, 0.28));
}

.txr-ticket svg {
  display: block;
  width: 100%;
  height: auto;
}

.txr-perks {
  position: relative;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.txr-perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.94);
}

.txr-perks svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   Right content panel
   -------------------------------------------------------------------------- */

.txr-content {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 40px 48px 34px;
  background: #fff;
  overflow-y: auto;
}

.txr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b6b6b;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.txr-close:hover {
  background: #f2f2f2;
  color: #111;
}

.txr-close svg {
  width: 18px;
  height: 18px;
}

.txr-close:focus-visible,
.txr-submit:focus-visible,
.txr-done:focus-visible {
  outline: 2px solid #ee3124;
  outline-offset: 2px;
}

.txr-logo {
  display: block;
  width: auto;
  height: 42px;
  margin-bottom: 22px;
}

.txr-kicker {
  margin: 0 0 8px;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ee3124;
}

.txr-title {
  margin: 0 0 10px;
  font-family: "gotham-narrow-bold", "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #1b1b1b;
}

.txr-desc {
  margin: 0 0 24px;
  max-width: 440px;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
  color: #5f6368;
}

/* Form ------------------------------------------------------------------- */

.txr-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.txr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.txr-label {
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2b2b2b;
}

.txr-label span {
  color: #ee3124;
}

.txr-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  background: #fff;
  color: #1b1b1b;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 44px;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.txr-input::placeholder {
  color: #9a9ea3;
  opacity: 1;
}

.txr-input:hover {
  border-color: #a9a9a9;
}

.txr-input:focus {
  border-color: #ee3124;
  box-shadow: 0 0 0 3px rgba(238, 49, 36, 0.13);
}

.txr-field.has-error .txr-input {
  border-color: #c62828;
  box-shadow: none;
}

.txr-error {
  display: none;
  margin: 0;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: #c62828;
}

.txr-field.has-error .txr-error {
  display: flex;
  align-items: center;
  gap: 5px;
}

.txr-error svg {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
}

.txr-submit {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100% !important;
  height: 50px !important;
  margin-top: 6px;
  padding: 0 20px !important;
  border: 0 !important;
  border-radius: 3px;
  background: #ee3124 !important;
  color: #fff !important;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(238, 49, 36, 0.24);
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.txr-submit:hover {
  background: #d5271b !important;
  box-shadow: 0 8px 18px rgba(238, 49, 36, 0.3);
}

.txr-submit:active {
  transform: translateY(1px);
}

.txr-submit svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.txr-submit:hover svg {
  transform: translateX(3px);
}

.txr-submit[disabled] {
  opacity: 0.72;
  cursor: default;
  transform: none;
}

.txr-submit.is-loading svg {
  display: none;
}

.txr-submit.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 1 !important;
  animation: txr-spin 0.8s linear infinite;
}

@keyframes txr-spin {
  to {
    transform: rotate(360deg);
  }
}

.txr-legal {
  margin: 4px 0 0;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.5;
  color: #8a8d91;
}

.txr-form-error {
  display: none;
  margin: 2px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #c62828;
  background: #fdf0ef;
  color: #a31b12;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.txr-form-error.is-visible {
  display: block;
}

/* Success ---------------------------------------------------------------- */

.txr-success {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 0;
}

.txr-content.is-success .txr-form-view {
  display: none;
}

.txr-content.is-success .txr-success {
  display: flex;
}

.txr-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: #e9f6ee;
  animation: txr-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.txr-check svg {
  width: 32px;
  height: 32px;
}

@keyframes txr-pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.txr-success h2 {
  margin: 0 0 12px;
  font-family: "gotham-narrow-bold", "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  text-transform: uppercase;
  color: #1b1b1b;
}

.txr-success p {
  margin: 0 0 10px;
  max-width: 420px;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #5f6368;
}

.txr-success strong {
  color: #1b1b1b;
  font-weight: 700;
  word-break: break-word;
}

.txr-success .txr-success-note {
  margin-top: 2px;
  font-size: 12.5px;
  color: #8a8d91;
}

/* Chinese copy: use native CJK fonts instead of the Latin brand faces */
.txr-dialog[lang="zh"] .txr-headline,
.txr-dialog[lang="zh"] .txr-title,
.txr-dialog[lang="zh"] .txr-success h2 {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.txr-dialog[lang="zh"] .txr-eyebrow,
.txr-dialog[lang="zh"] .txr-kicker {
  letter-spacing: 0.08em;
}

.txr-done {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 46px !important;
  margin-top: 18px;
  padding: 0 26px !important;
  border: 2px solid #1b1b1b !important;
  border-radius: 3px;
  background: transparent !important;
  color: #1b1b1b !important;
  font-family: "OpenSans", "Trebuchet MS", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.txr-done:hover {
  background: #1b1b1b !important;
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .txr-dialog {
    flex-direction: column;
    max-height: calc(100vh - 32px);
  }

  .txr-visual {
    flex: 0 0 auto;
    max-width: none;
    padding: 24px 24px 20px;
  }

  .txr-visual__star {
    top: -60px;
    right: -50px;
    width: 220px;
    height: 220px;
  }

  .txr-eyebrow {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .txr-headline {
    margin-bottom: 0;
    max-width: 80%;
    font-size: 28px;
  }

  .txr-sub,
  .txr-ticket,
  .txr-perks {
    display: none;
  }

  .txr-content {
    padding: 28px 24px 24px;
  }

  .txr-logo {
    height: 34px;
    margin-bottom: 16px;
  }

  .txr-title {
    font-size: 27px;
  }

  .txr-close {
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .txr-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
  }
}

@media (max-width: 480px) {
  .txr-modal {
    padding: 12px;
  }

  .txr-dialog {
    max-height: calc(100vh - 24px);
    border-radius: 5px;
  }

  .txr-visual {
    padding: 20px 18px 16px;
  }

  .txr-headline {
    font-size: 24px;
  }

  .txr-content {
    padding: 24px 18px 20px;
  }

  .txr-title {
    font-size: 24px;
  }

  .txr-input {
    height: 44px;
    font-size: 16px;
    line-height: 42px;
  }

  .txr-legal {
    font-size: 10px;
  }
}

@media (max-width: 480px) and (max-height: 700px) {
  .txr-visual {
    padding: 16px 18px 14px;
  }

  .txr-eyebrow {
    margin-bottom: 6px;
  }

  .txr-headline {
    font-size: 22px;
  }

  .txr-content {
    padding: 20px 18px 16px;
  }

  .txr-logo {
    height: 30px;
    margin-bottom: 12px;
  }

  .txr-title {
    font-size: 22px;
  }

  .txr-desc {
    margin-bottom: 16px;
    font-size: 13px;
  }

  .txr-form {
    gap: 10px;
  }

  .txr-submit {
    margin-top: 2px;
  }

  .txr-legal {
    margin-top: 2px;
  }
}

@media (max-height: 660px) and (min-width: 901px) {
  .txr-visual {
    padding: 30px 32px 24px;
  }

  .txr-headline {
    font-size: 32px;
  }

  .txr-sub {
    margin-bottom: 18px;
  }

  .txr-ticket {
    margin-bottom: 18px;
    max-width: 250px;
  }

  .txr-content {
    padding: 28px 40px 24px;
  }

  .txr-logo {
    height: 34px;
    margin-bottom: 14px;
  }

  .txr-desc {
    margin-bottom: 16px;
  }

  .txr-form {
    gap: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .txr-modal,
  .txr-dialog,
  .txr-submit,
  .txr-submit svg,
  .txr-close {
    transition: none !important;
  }

  .txr-check,
  .txr-submit.is-loading::before {
    animation: none !important;
  }
}

/* Scroll lock applied while the modal is open */
html.txr-lock,
body.txr-lock {
  overflow: hidden !important;
}
