:root {
  --checkout-orange: #f97316;
  --checkout-gray: #f6f3ef;
  --checkout-cream: #fffaf5;
  --checkout-border: #f0dccf;
  --checkout-text: #1f2937;
  --checkout-muted: #6b7280;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.12), transparent 34%),
    linear-gradient(180deg, #fffaf4 0%, var(--checkout-gray) 100%);
  padding: 1.5rem 1rem;
  font-family: system, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(240, 220, 207, 0.9);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 0.75rem;
  max-width: 28rem;
  margin: 0 auto;
  backdrop-filter: blur(8px);
}

.hero-banner {
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fef3e8 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.hero-header {
  background: #073250;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.company-name {
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.company-mark {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.surface-panel {
  border: 1px solid var(--checkout-border);
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--checkout-cream) 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.device-panel {
  margin-top: 0.55rem;
  padding: 0.65rem;
}

.device-info-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.38rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f3e4db;
  border-radius: 0.7rem;
  padding: 0.45rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  min-width: 0;
  min-height: 2.35rem;
}

.info-card-rule {
  align-items: flex-start;
  min-height: 0;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.info-icon-wrap {
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 1.65rem;
  border-radius: 0.58rem;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-content {
  flex: 1;
  min-width: 0;
}

.info-label {
  display: none;
}

.info-value {
  margin-top: 0;
  color: var(--checkout-text);
  font-size: 0.82rem;
  line-height: 1.25;
  word-break: break-word;
}

.info-rule-text {
  margin-top: 0;
  color: #374151;
  font-size: 0.74rem;
  line-height: 1.28;
}

.usage-list {
  margin-top: 0.18rem;
  padding-left: 0;
  list-style: disc;
  list-style-position: inside;
}

.usage-list li + li {
  margin-top: 0.12rem;
}

.icon {
  color: #ff5100; /* Dark orange color */
  width: 0.86rem;
  height: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

img.icon {
  object-fit: contain;
  filter: invert(37%) sepia(90%) saturate(1000%) hue-rotate(360deg)
    brightness(100%) contrast(100%);
}

.info-icon {
  width: 0.86rem;
  height: 0.86rem;
}

.text-gray {
  color: #4b5563;
}

.button {
  background-color: var(--checkout-orange);
  color: white;
  width: 100%;
  padding: 1rem;
  /* border-radius: 0.375rem; */
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.button:hover {
  background-color: #ea580c;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.6rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #f2dfd2;
  border-radius: 0.75rem;
}

.checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
}

.bottom-btn {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
  width: 100%;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 8px 18px rgba(234, 88, 12, 0.18);
}

.bottom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.flow-panel {
  margin-top: 0.75rem;
  padding: 0.75rem;
}

.flow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.flow-step {
  color: #c14b18;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flow-title {
  margin-top: 0.25rem;
  color: var(--checkout-text);
  font-size: 0.98rem;
  font-weight: 700;
}

.flow-subtitle {
  margin-top: 0.45rem;
  color: var(--checkout-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.flow-summary {
  margin-top: 0.6rem;
  border: 1px solid #f3d8ca;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
}

.summary-label {
  display: block;
  color: #9a3412;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-value {
  display: block;
  margin-top: 0.25rem;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 700;
}

.flow-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #9a3412;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.field-group {
  margin-top: 0.7rem;
}

.field-label {
  display: block;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.flow-input {
  width: 100%;
  border: 1px solid #dfd3cb;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.72rem 0.8rem;
  font-size: 0.86rem;
  color: #111827;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.flow-input:focus {
  outline: none;
  border-color: #eb5d20;
  box-shadow: 0 0 0 3px rgba(235, 93, 32, 0.12);
}

.otp-meta {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.otp-timer {
  color: #6b7280;
  font-size: 0.74rem;
}

.text-link {
  border: 0;
  background: transparent;
  color: #c14b18;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.text-link:disabled,
.primary-btn:disabled,
.secondary-btn:disabled,
.flow-close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.flow-msg {
  margin-top: 0.65rem;
  border-radius: 0.7rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.76rem;
  line-height: 1.28;
}

.flow-msg.is-error {
  background: #fff1f2;
  color: #b42318;
}

.flow-msg.is-success {
  background: #ecfdf3;
  color: #027a48;
}

.flow-msg.is-info {
  background: #fff7ed;
  color: #9a3412;
}

.flow-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.primary-btn,
.secondary-btn {
  flex: 1;
  border-radius: 0.7rem;
  padding: 0.72rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.primary-btn {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: 0;
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.22);
}

.secondary-btn {
  background: #ffffff;
  color: #9a3412;
  border: 1px solid #f3d8ca;
}

.loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 99;
}
.loading-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
}
.loading-img img {
  width: 100%;
  height: 100%;
}
.result {
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 64px 12px;
  border-radius: 8px;
  color: #e8e8e8;
  transition: all 0.8s;
  z-index: 9999;
  pointer-events: none;
}
.msg {
  display: none;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  min-width: min(92vw, 20rem);
  background: #fff1f2;
  color: #b42318;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #fecdd3;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  z-index: 999;
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  body {
    padding: 0.65rem 0.55rem;
  }

  .card {
    padding: 0.65rem;
  }

  .hero-image {
    height: auto;
  }

  .device-panel {
    padding: 0.55rem;
  }

  .device-info-list {
    gap: 0.35rem;
  }

  .info-card {
    min-height: 2.2rem;
    padding: 0.42rem 0.55rem;
  }

  .info-rule-text {
    font-size: 0.7rem;
  }

  .checkbox-wrapper {
    margin: 0.5rem 0 0.6rem;
    padding: 0.55rem 0.65rem;
  }

  .flow-actions {
    flex-direction: column;
  }
}
.terms-panel {
  width: 100%;
}

.terms-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.terms-version {
  color: #6b7280;
  font-size: 0.75rem;
  margin: 0.25rem 0;
}

.terms-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.5rem 0;
  overflow-wrap: anywhere;
  overflow: visible;
  padding: 0.75rem;
  white-space: normal;
}

html.terms-modal-open,
body.terms-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.checkbox-wrapper {
  align-items: start;
  column-gap: 0.5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  row-gap: 0.65rem;
}

.checkbox-wrapper label {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.terms-view-link {
  display: inline-block;
  grid-column: 2;
  grid-row: 2;
  font-size: 0.78rem;
  justify-self: start;
  margin-left: 0;
  max-width: 100%;
  text-align: left;
  width: max-content;
}

.terms-modal,
.terms-rejected {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 1000;
}

.terms-modal.hidden,
.terms-rejected.hidden {
  display: none !important;
}

.terms-modal-backdrop,
.terms-rejected {
  background: rgba(15, 23, 42, 0.72);
}

.terms-modal-backdrop {
  inset: 0;
  position: absolute;
}

.terms-modal-card,
.terms-rejected-card {
  background: #ffffff;
  border: 1px solid #ead8ca;
  border-radius: 0.9rem;
  box-sizing: border-box;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  max-width: min(42rem, calc(100vw - 2rem));
  min-width: 0;
  overflow: hidden;
  padding: 1.1rem;
  position: relative;
  width: min(100%, 42rem);
  height: auto;
  z-index: 1;
}

.terms-modal-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.terms-modal .terms-content {
  font-size: 0.875rem;
  line-height: 1.45;
  margin: 0.8rem 0;
  max-height: none;
  overflow: visible;
}

.terms-close {
  align-items: center;
  display: inline-flex;
  font-size: 1.5rem;
  justify-content: center;
  line-height: 1;
  min-height: 2.25rem;
  min-width: 2.25rem;
  padding: 0.15rem 0.35rem;
}

.terms-support {
  font-weight: 800;
}

.terms-line,
.terms-line-spacer {
  display: block;
}

.terms-line-spacer {
  height: 0.65em;
}

.terms-list-item {
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr);
}

.terms-list-marker,
.terms-list-text {
  min-width: 0;
}

.terms-modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.terms-modal-actions button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.5rem;
  white-space: normal;
}

.terms-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 0.45rem;
  color: #b42318;
  font-size: 0.82rem;
  margin: 0.5rem 0;
  padding: 0.6rem;
}

.terms-highlight {
  background-color: transparent;
  color: #c2410c;
  font-weight: 800;
}

.terms-rejected-card {
  max-width: 25rem;
  text-align: left;
}

.terms-rejected-card h2 {
  color: #991b1b;
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  text-align: center;
}

.terms-rejected-card p {
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0.35rem 0;
}

@media (max-width: 480px) {
  .terms-modal,
  .terms-rejected {
    padding: 0.65rem;
  }

  .terms-modal-card,
  .terms-rejected-card {
    border-radius: 0.75rem;
    max-width: calc(100vw - 1.3rem);
    padding: 0.85rem;
  }

  .terms-modal .terms-content {
    font-size: 0.875rem;
    line-height: 1.35;
    margin: 0.5rem 0;
    padding: 0.55rem;
  }

  .terms-modal-actions {
    flex-direction: row;
    gap: 0.45rem;
  }

  .terms-modal-actions button {
    font-size: 0.82rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

}

@media (max-width: 400px), (max-height: 700px) {
  .terms-modal {
    padding: 0.4rem;
  }

  .terms-modal-card {
    padding: 0.65rem;
  }

  .terms-title {
    font-size: 1rem;
    margin-bottom: 0.1rem;
  }

  .terms-version {
    font-size: 0.67rem;
    margin: 0.1rem 0;
  }

  .terms-modal .terms-content {
    font-size: 0.875rem;
    line-height: 1.25;
    margin: 0.35rem 0;
    padding: 0.45rem;
  }

  .terms-close {
    min-height: 1.8rem;
    min-width: 1.8rem;
  }

  .terms-modal-actions {
    margin-top: 0.45rem;
  }

  .terms-modal-actions button {
    min-height: 2.1rem;
  }
}
/* Mock deployment marker; remains hidden in normal deployments. */
.mock-banner {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 10000;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 0 0 0.5rem 0.5rem;
  background: #991b1b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
