/* Paywrap Seller Demo */

:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #4c45a3; /* figma-like purple */
  --primary2: #5b55c6;
  --line: rgba(17, 24, 39, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.10);
  --r: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app {
  min-height: 100%;
  width: min(390px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.screen {
  min-height: 100%;
  display: none;
  flex-direction: column;
}

.screen--active {
  display: flex;
}

/* amount screen */
.panel {
  padding: 28px 22px 0;
  flex: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.logo__image {
  width: 120px;
}

.logo__mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(76, 69, 163, 1), rgba(91, 85, 198, 1));
  box-shadow: 0 12px 28px rgba(76, 69, 163, 0.30);
}

.logo__name {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo__sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(17, 24, 39, 0.55);
  font-weight: 800;
  margin-top: 2px;
}

.title {
  margin: 22px 0 22px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.field__label {
  font-size: 13px;
  color: rgba(17, 24, 39, 0.55);
  margin-bottom: 8px;
}

.money {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.money__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 22px;
  padding: 8px 44px 8px 0;
  letter-spacing: -0.02em;
}

.money__suffix {
  color: rgba(17, 24, 39, 0.55);
  font-weight: 800;
}

.money__clear {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.06);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.field__line {
  height: 2px;
  background: var(--primary);
  margin-top: 8px;
  border-radius: 2px;
}

.bottom {
  padding: 18px 22px 24px;
}

.btn {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 16px 34px rgba(76, 69, 163, 0.28);
}

.btn--primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(17, 24, 39, 0.14);
  color: var(--text);
}

.btn--sm {
  height: 44px;
  border-radius: 12px;
}

/* top bars */
.top {
  height: 56px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top--center {
  justify-content: center;
  position: relative;
}

.top--center .iconx {
  position: absolute;
  right: 10px;
}

.top__title {
  font-weight: 900;
}

.iconx {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.06);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

/* scan */
.scan {
  padding: 10px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scan__hint {
  text-align: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0));
  padding: 14px 10px 10px;
  border-radius: 14px;
}

.camera {
  flex: 1;
  min-height: 520px;
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(800px 700px at 50% 40%, rgba(76, 69, 163, 0.45), rgba(0, 0, 0, 0.65));
  position: relative;
  box-shadow: var(--shadow);
}

.camera__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 520px;
}

.frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 66px;
  height: 66px;
  border: 6px solid rgba(76, 69, 163, 0.95);
  border-radius: 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.corner--tl {
  left: 50%;
  top: 50%;
  transform: translate(-170px, -170px);
  border-right: none;
  border-bottom: none;
}

.corner--tr {
  left: 50%;
  top: 50%;
  transform: translate(104px, -170px);
  border-left: none;
  border-bottom: none;
}

.corner--bl {
  left: 50%;
  top: 50%;
  transform: translate(-170px, 104px);
  border-right: none;
  border-top: none;
}

.corner--br {
  left: 50%;
  top: 50%;
  transform: translate(104px, 104px);
  border-left: none;
  border-top: none;
}

/* fallback */
.fallback {
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(17, 24, 39, 0.03);
  padding: 14px;
  display: none;
}

.fallback--show {
  display: block;
}

.fallback__title {
  font-weight: 900;
}

.fallback__desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.fallback__row {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.fallback__input {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  padding: 0 12px;
  outline: none;
}

/* center screens */
.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 18px;
  text-align: center;
}

.center__title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid rgba(76, 69, 163, 0.18);
  border-top-color: var(--primary);
  animation: spin 900ms linear infinite;
}

.center__error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.20);
  color: rgba(185, 28, 28, 0.92);
  font-size: 13px;
  line-height: 1.4;
  max-width: 320px;
  text-align: center;
  display: none;
}

.center__error--show {
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.check {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.done__product {
  margin-top: 12px;
  max-width: 320px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.72);
  letter-spacing: -0.01em;
  word-break: keep-all;
}

.done__amount {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 1000;
}

.done__title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 28px));
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  color: rgba(255, 255, 255, 0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.toast--show {
  opacity: 1;
}


