/* Orbex Auth — premium pink-wave login / signup (mobile-first) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --wa-crimson: #c2185b;
  --wa-pink: #e91e63;
  --wa-pink-hot: #ff4081;
  --wa-pink-soft: #f8bbd0;
  --wa-ink: #2b2b2b;
  --wa-muted: #9a9a9a;
  --wa-field: #efefef;
  --wa-line: #d6d6d6;
  --wa-black: #1a1a1a;
  --wa-white: #ffffff;
  --wa-grad: linear-gradient(135deg, #ad1457 0%, #e91e63 48%, #f06292 100%);
  --wa-grad-btn: linear-gradient(180deg, #f06292 0%, #e91e63 42%, #c2185b 100%);
  --wa-radius-pill: 999px;
  --wa-frame: 28px;
  --wa-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wa-max: 430px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  margin: 0;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body.wa-auth {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--wa-ink);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(233, 30, 99, 0.14), transparent 60%),
    #f7e9ef;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Phone frame ===== */
.wa-page {
  position: relative;
  width: 100%;
  max-width: var(--wa-max);
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff7fa;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  animation: wa-rise 0.55s var(--wa-ease) both;
}

@keyframes wa-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 480px) {
  body.wa-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
  }

  .wa-page {
    min-height: min(860px, calc(100dvh - 48px));
    max-height: calc(100dvh - 48px);
    border-radius: var(--wa-frame);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.04),
      0 28px 80px rgba(173, 20, 87, 0.18),
      0 8px 24px rgba(0, 0, 0, 0.08);
  }
}

/* ===== Decorative waves ===== */
.wa-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.wa-deco svg {
  position: absolute;
  display: block;
  width: 100%;
  height: auto;
}

.wa-deco svg.wa-deco__top {
  top: 0;
  left: 0;
  right: 0;
  width: 100% !important;
  max-width: none !important;
  height: 120px !important;
  min-height: 100px;
}

.wa-page--signup .wa-deco svg.wa-deco__top {
  width: 100% !important;
  max-width: none !important;
  height: 108px !important;
  min-height: 90px;
}

.wa-deco__bottom {
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 200px;
  min-height: 180px;
  max-height: 240px;
}

.wa-page--signup .wa-deco__bottom {
  height: 200px;
  min-height: 180px;
  max-height: 230px;
  width: 100%;
}

.wa-deco__bottom svg {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 100%;
}

.wa-page--signup .wa-deco__bottom svg {
  width: 100%;
  left: 0;
  transform: none;
}

/* ===== Home chip ===== */
.wa-home {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wa-pink);
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s var(--wa-ease), box-shadow 0.2s var(--wa-ease);
}

.wa-home:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 22px rgba(233, 30, 99, 0.2);
}

.wa-page--login .wa-home {
  right: auto;
  left: 14px;
}

/* ===== Main ===== */
.wa-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding:
    clamp(88px, 14vh, 120px)
    clamp(22px, 6vw, 36px)
    24px;
}

.wa-page--signup .wa-main {
  padding-top: clamp(64px, 10vh, 88px);
  padding-bottom: 24px;
}

.wa-page--login .wa-main {
  padding-top: clamp(100px, 16vh, 130px);
}

/* Keep auth content clearly above decorative waves */
.wa-content {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border-radius: 0;
  padding: 4px 4px 8px;
  position: relative;
  z-index: 2;
  box-shadow: none;
}

.wa-page--login .wa-content {
  margin-bottom: 90px;
}

.wa-page--signup .wa-main {
  padding-bottom: 120px;
}

.wa-title {
  margin: 0 0 clamp(22px, 4vh, 36px);
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--wa-pink);
  text-align: center;
}

.wa-alert {
  display: none;
  width: 100%;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.wa-alert.is-show { display: block; animation: wa-rise 0.35s var(--wa-ease) both; }

.wa-alert--error {
  background: #fce4ec;
  color: #880e4f;
  border: 1px solid #f8bbd0;
}

.wa-alert--warn {
  background: #fff8e1;
  color: #e65100;
  border: 1px solid #ffe082;
}

.wa-alert--ok {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

/* ===== Form ===== */
.wa-form {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wa-field {
  display: block;
  width: 100%;
  position: relative;
}

.wa-field input {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 22px;
  border-radius: var(--wa-radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--wa-ink);
  outline: none;
  transition:
    border-color 0.22s var(--wa-ease),
    box-shadow 0.22s var(--wa-ease),
    background 0.22s var(--wa-ease),
    transform 0.22s var(--wa-ease);
}

.wa-field input::placeholder {
  color: #a3a3a3;
  font-weight: 400;
  opacity: 1;
}

.wa-field--outline input {
  background: var(--wa-white);
  border: 1.5px solid var(--wa-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.wa-field--filled input {
  background: var(--wa-field);
  border: 1.5px solid transparent;
}

.wa-field input:hover {
  border-color: #cfcfcf;
}

.wa-field input:focus {
  border-color: var(--wa-pink);
  background: var(--wa-white);
  box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.14);
}

.wa-field--pass input {
  padding-right: 50px;
}

.wa-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #b0b0b0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: color 0.2s var(--wa-ease), background 0.2s var(--wa-ease);
}

.wa-eye:hover {
  color: var(--wa-pink);
  background: rgba(233, 30, 99, 0.06);
}

.wa-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
  cursor: pointer;
  user-select: none;
}

.wa-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--wa-pink);
  cursor: pointer;
}

/* ===== CTA button ===== */
.wa-submit {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--wa-radius-pill);
  background: var(--wa-grad-btn);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 12px 28px rgba(194, 24, 91, 0.38),
    0 2px 0 rgba(255, 255, 255, 0.25) inset;
  transition:
    transform 0.18s var(--wa-ease),
    box-shadow 0.18s var(--wa-ease),
    filter 0.18s var(--wa-ease);
}

.wa-submit:hover {
  filter: brightness(1.05);
  box-shadow:
    0 16px 34px rgba(194, 24, 91, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.28) inset;
  transform: translateY(-1px);
}

.wa-submit:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 6px 16px rgba(194, 24, 91, 0.32);
}

.wa-submit:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
  filter: grayscale(0.15);
}

.wa-switch,
.wa-switch span,
.wa-switch a,
.wa-page--signup .wa-switch,
.wa-page--login .wa-switch,
.wa-page--signup .wa-switch span,
.wa-page--login .wa-switch span,
.wa-page--signup .wa-switch a,
.wa-page--login .wa-switch a {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  fill: #ffffff !important;
}

.wa-switch {
  margin: 28px 0 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-shadow: none !important;
  position: relative;
  z-index: 6;
  background: transparent !important;
  padding: 0 !important;
  filter: none !important;
}

.wa-switch a {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #ffffff !important;
  text-transform: uppercase;
  margin-left: 4px;
}

.wa-switch a:hover {
  opacity: 1 !important;
  color: #ffffff !important;
}

.wa-spacer {
  flex: 0 0 auto;
  height: clamp(8px, 2vh, 24px);
}

/* Tiny screens */
@media (max-width: 360px) {
  .wa-form { gap: 12px; }
  .wa-field input,
  .wa-submit { height: 48px; }
  .wa-title { margin-bottom: 18px; }
  .wa-main {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-height: 700px) {
  .wa-page--signup .wa-main {
    padding-top: 48px;
    padding-bottom: 120px;
  }
  .wa-page--login .wa-main {
    padding-top: 64px;
    padding-bottom: 100px;
  }
  .wa-title { margin-bottom: 16px; font-size: 28px; }
  .wa-form { gap: 10px; }
  .wa-deco__bottom { min-height: 100px; height: 20%; max-height: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-page,
  .wa-alert,
  .wa-submit,
  .wa-field input,
  .wa-home {
    animation: none !important;
    transition: none !important;
  }
}
