/* src/styles.css */
:root {
  color: #0b0f1a;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  background: #0a1322;
  font-family: Inter, Helvetica Neue, Helvetica, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body, #root {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  background: radial-gradient(900px 560px at 50% -10%, #172743 0%, #0000 68%), #0a1322;
  place-items:  center;
  min-height: 100vh;
  padding: 28px 16px;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid #2e4fc438;
  outline-offset: 2px;
}

a:focus-visible {
  outline: 3px solid #2e4fc438;
  outline-offset: 2px;
}

input:focus-visible {
  outline: 3px solid #2e4fc438;
  outline-offset: 2px;
}

.widget-shell {
  width: min(400px, 100vw - 32px);
}

.collapsed-widget, .expanded-widget, .compact-message, .zkpassport-spike {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 16px;
  width: 100%;
  box-shadow: 0 24px 60px #040a1880;
}

.collapsed-widget {
  display: flex;
  color: #0b0f1a;
  text-align: left;
  cursor: pointer;
  align-items:  center;
  gap: 12px;
  min-height: 64px;
  padding: 13px 16px;
  transition: background .16s, transform .16s;
}

.collapsed-widget:hover {
  background: #f8fafd;
}

.collapsed-widget:active {
  transform: translateY(1px);
}

.globe-mark {
  display: block;
  flex: none;
}

.collapsed-copy {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.collapsed-copy strong {
  font-size: 14.5px;
  font-weight: 700;
}

.collapsed-copy small {
  overflow: hidden;
  color: #8a93a2;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.chevron {
  color: #8a93a2;
  font-size: 21px;
}

.expanded-widget {
  animation: expand-in .22s ease-out;
}

.compact-header {
  display: flex;
  border-bottom: 1px solid #edf0f4;
  align-items:  center;
  gap: 10px;
  padding: 17px 20px 15px;
}

.compact-header p {
  color: #5b6472;
  flex: 1;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
}

.compact-header strong {
  color: #0b0f1a;
}

.icon-button {
  display: grid;
  color: #8a93a2;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 50%;
  place-items:  center;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 21px;
}

.icon-button:hover {
  color: #0b0f1a;
  background: #f4f6fa;
}

.flow-panel, .proof-intro, .centered-progress, .proof-progress {
  padding: 22px 24px;
}

.flow-panel h2, .proof-intro h2, .proof-progress h2 {
  color: #0b0f1a;
  letter-spacing: -.02em;
  margin: 0 0 9px;
  font-size: 18px;
  font-weight: 730;
  line-height: 1.25;
}

.eyebrow {
  color: #2e4fc4;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 7px;
  font-size: 11.5px;
  font-weight: 750;
}

.body-copy {
  color: #5b6472;
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.55;
}

.body-copy strong {
  color: #0b0f1a;
}

.primary-button, .secondary-button, .text-button {
  cursor: pointer;
  border-radius: 10px;
  width: 100%;
  min-height: 45px;
  padding: 10px 14px;
  transition: background .15s, border-color .15s, transform .15s;
  font-size: 13.5px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: #2e4fc4;
  border: 1px solid #2e4fc4;
  box-shadow: 0 8px 18px #2e4fc42e;
}

.primary-button:hover {
  background: #253fa2;
}

.secondary-button {
  color: #22306c;
  background: #f4f6fa;
  border: 1px solid #d6dce6;
  margin-top: 9px;
}

.secondary-button:hover {
  background: #edf0f6;
  border-color: #bcc5d4;
}

.text-button {
  color: #5b6472;
  box-shadow: none;
  text-decoration: underline;
  background: none;
  border: 0;
  min-height: 38px;
  margin-top: 7px;
  font-size: 12.5px;
}

.text-button:hover {
  color: #0b0f1a;
  background: #f8fafd;
}

button:disabled {
  cursor: not-allowed;
  opacity: .56;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

.verification-form label {
  display: block;
  color: #202636;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 700;
}

.verification-form input {
  outline: 0;
  color: #0b0f1a;
  background: #fff;
  border: 1.5px solid #d6dce6;
  border-radius: 10px;
  width: 100%;
  min-height: 47px;
  padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}

.verification-form input:focus {
  border-color: #2e4fc4;
  box-shadow: 0 0 0 3px #2e4fc426;
}

.verification-form .otp-input {
  letter-spacing: .34em;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.field-help {
  color: #8a93a2;
  margin: 7px 1px 15px;
  font-size: 11.5px;
  line-height: 1.45;
}

.form-message {
  color: #b4433a;
  margin: 9px 1px 13px;
  font-size: 12.5px;
  line-height: 1.45;
}

.success-choice, .final-success {
  text-align: center;
}

.success-icon {
  display: grid;
  color: #fff;
  animation: success-pop .42s cubic-bezier(.2, 1.4, .4, 1) both;
  background: #1e9e5a;
  border-radius: 50%;
  place-items:  center;
  width: 52px;
  height: 52px;
  margin: 2px auto 14px;
  font-size: 24px;
  font-weight: 800;
}

.zkpassport-panel {
  padding-bottom: 2px;
}

.proof-intro {
  text-align: center;
  padding-bottom: 12px;
}

.proof-intro .body-copy {
  margin-bottom: 0;
}

.zkpassport-official, .zkpassport-official > div {
  width: 100%;
}

.zkpassport-official .zkp-card {
  border: 0;
  border-radius: 0;
  min-width: 0;
  max-width: none;
}

.proof-progress {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 14px;
}

.large-spinner, .spinner {
  display: block;
  animation: spin .8s linear infinite;
  border: 3px solid #dce3f6;
  border-top-color: #2e4fc4;
  border-radius: 50%;
}

.large-spinner {
  width: 38px;
  height: 38px;
}

.spinner {
  width: 24px;
  height: 24px;
}

.centered-progress {
  display: grid;
  text-align: center;
  place-content:  center;
  justify-items: center;
  gap: 11px;
  min-height: 150px;
}

.centered-progress p {
  color: #5b6472;
  margin: 0;
  font-size: 12.5px;
}

.consent-checks {
  display: grid;
  list-style: none;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
}

.consent-checks li {
  display: flex;
  color: #364152;
  align-items:  center;
  gap: 9px;
  font-size: 12.5px;
}

.consent-checks span {
  display: grid;
  color: #fff;
  background: #1e9e5a;
  border-radius: 50%;
  place-items:  center;
  width: 19px;
  height: 19px;
  font-size: 10px;
}

.compact-footer {
  display: flex;
  background: #fbfcfe;
  border-top: 1px solid #edf0f4;
  justify-content: space-between;
  align-items:  center;
  gap: 10px;
  padding: 11px 18px;
}

.policy-chips {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.policy-chips li {
  color: #6f7887;
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 9.5px;
  font-weight: 650;
}

.cancel-link {
  color: #8a93a2;
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: 0;
  flex: none;
  padding: 5px;
  font-size: 10.5px;
}

.compact-message {
  display: flex;
  align-items:  center;
  gap: 12px;
  padding: 15px 16px;
}

.compact-message div {
  display: grid;
  gap: 3px;
}

.compact-message strong {
  font-size: 14px;
}

.compact-message span {
  color: #8a93a2;
  font-size: 12px;
}

.widget-loading {
  animation: spin .8s linear infinite;
  border: 3px solid #ffffff40;
  border-top-color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: auto;
}

.preview-panel .flow-panel {
  min-height: 190px;
}

.zkpassport-spike {
  padding: 24px;
}

.zkpassport-spike h1, .zkpassport-spike h2 {
  margin-top: 0;
}

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

@keyframes expand-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes success-pop {
  from {
    opacity: 0;
    transform: scale(.55);
  }

  70% {
    transform: scale(1.08);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (width <= 430px) {
  body {
    padding: 14px 10px;
  }

  .widget-shell {
    width: min(400px, 100vw - 20px);
  }

  .flow-panel, .proof-intro, .proof-progress {
    padding-left: 19px;
    padding-right: 19px;
  }

  .compact-header {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [class], [class]:before, [class]:after {
    animation-duration: 1ms;
    animation-iteration-count: 1;
    transition-duration: 1ms;
  }
}
