/* partials/pay/css/pay-common.css */

html,
body {
  min-height: 100%;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #000e2d;
  color: #ffffff;
}

#pay-brand,
#pay-history,
#pay-guide,
#pay-footer,
.pay-navigation {
  position: relative;
  z-index: 2;
}

#pay-history,
#pay-guide,
#pay-footer {
  width: min(100%, 440px);
}

/* --------------------------------------------------
   Page shell — mirrors Connect
-------------------------------------------------- */

.pay-page-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;

  overflow-x: hidden;
  overflow-y: auto;

  text-align: center;
  background: #000e2d;
}

.pay-page-shell::before {
  content: "";
  position: fixed;
  top: 78px;
  left: 0;
  right: 0;
  height: 560px;
  z-index: 0;
  pointer-events: none;

  background:
    url("/public/icons/social/connect-map-bg.png")
    center top / 1120px auto
    no-repeat;

  -webkit-mask-image:
    linear-gradient(
      180deg,
      transparent 0%,
      #000 7%,
      #000 76%,
      transparent 100%
    );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;

  mask-image:
    linear-gradient(
      180deg,
      transparent 0%,
      #000 7%,
      #000 76%,
      transparent 100%
    );
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

.pay-page-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background:
    radial-gradient(
      circle at 50% 26%,
      rgba(20, 184, 166, 0.09),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      rgba(0, 14, 45, 0) 0%,
      rgba(0, 14, 45, 0.1) 48%,
      rgba(0, 14, 45, 0.18) 100%
    );
}

/* --------------------------------------------------
   Brand — mirrors Connect
-------------------------------------------------- */

#pay-brand {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 28px;
  right: 28px;
  z-index: 20;
  width: auto;
  pointer-events: none;
}

.pay-brandbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pay-brandbar-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  pointer-events: auto;
}

.pay-brandbar-logo {
  width: 260px;
  max-width: 62vw;
  height: auto;
  display: block;
  opacity: 0.94;
}

.pay-domain-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;

  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 999px;

  background: rgba(20, 184, 166, 0.08);
  color: #5eead4;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;

  box-shadow:
    0 0 18px rgba(20, 184, 166, 0.08);

  white-space: nowrap;
  pointer-events: auto;
}

.pay-domain-pill:hover {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(94, 234, 212, 0.34);
  color: #99f6e4;
}

/* --------------------------------------------------
   Tabs — exact Connect geometry
-------------------------------------------------- */

.pay-navigation {
  position: relative;
  width: min(100%, 440px);

  display: grid;
  grid-template-columns: 1fr 1fr;

  margin: 0 0 18px;
  padding: 0;
  gap: 0;

  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px 9px 0 0;

  background: rgba(9, 30, 65, 0.72);

  overflow: hidden;
  text-align: center;
}

.pay-navigation-link {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;
  min-height: 43px;
  padding: 12px 14px;

  border: 0;
  border-radius: 0;

  background: transparent;
  color: rgba(255, 255, 255, 0.58);

  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;

  cursor: pointer;

  transition:
    color 160ms ease,
    background 160ms ease;
}

.pay-navigation-link + .pay-navigation-link {
  border-left: 1px solid rgba(255, 255, 255, 0.045);
}

.pay-navigation-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.025);
}

.pay-navigation-link.is-active,
.pay-navigation-link[aria-current="page"] {
  background: transparent;
  color: #5eead4;
  font-weight: 750;
  box-shadow: none;
}

.pay-navigation-link.is-active::after,
.pay-navigation-link[aria-current="page"]::after {
  content: "";
  position: absolute;

  left: 12px;
  right: 12px;
  bottom: 0;

  height: 2px;
  border-radius: 999px 999px 0 0;

  background: #2dd4bf;

  box-shadow:
    0 0 10px rgba(45, 212, 191, 0.38);
}

/* --------------------------------------------------
   Guide
-------------------------------------------------- */

.pay-guide-link-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.pay-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 36px;
  padding: 0 14px;

  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 999px;

  background: rgba(20, 184, 166, 0.06);
  color: #5eead4;

  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

/* --------------------------------------------------
   Footer — mirrors Connect
-------------------------------------------------- */

.pay-lite-footer {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  margin-top: 44px;
  padding: 26px 0 8px;

  color: rgba(255, 255, 255, 0.56);

  font-size: 12px;
}

.pay-lite-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pay-lite-footer-links a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

.pay-lite-footer-links a:hover {
  color: #ffffff;
}

/* --------------------------------------------------
   Responsive — copied from Connect
-------------------------------------------------- */

@media (max-width: 900px) {
  .pay-brandbar-logo {
    width: 220px;
    max-width: 58vw;
  }
}

@media (max-width: 430px) {
  .pay-page-shell {
    gap: 12px;
    padding: 14px;
    justify-content: flex-start;

    padding-top:
      max(
        24px,
        env(safe-area-inset-top)
      );

    padding-bottom:
      max(
        14px,
        env(safe-area-inset-bottom)
      );
  }

  .pay-page-shell::before {
    top: 78px;
    height: 500px;

    background:
      url("/public/icons/social/connect-map-bg.png")
      center top / 780px auto
      no-repeat;
  }

  #pay-brand {
    position: relative;

    top: auto;
    left: auto;
    right: auto;

    width: min(100%, 392px);

    justify-content: center;
    margin: 0 0 4px;

    pointer-events: none;
  }

  .pay-brandbar {
    justify-content: center;
  }

  .pay-brandbar-logo {
    width: 150px;
    max-width: 52vw;
  }

  .pay-domain-pill {
    display: none;
  }

  #pay-history,
  #pay-guide,
  #pay-footer {
    width: min(100%, 392px);
  }

  .pay-navigation {
    width: min(100%, 392px);
    margin-top: 2px;
    margin-bottom: 12px;
  }

  .pay-navigation-link {
    min-height: 41px;
    padding: 12px 10px;
    font-size: 13px;
  }

  .pay-guide-link-wrap {
    margin-top: 14px;
  }

  .pay-guide-link {
    min-height: 34px;
    padding: 0 13px;
    font-size: 12px;
  }

  .pay-lite-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;

    gap: 10px;
    margin-top: 36px;
    padding-bottom: 10px;
  }
}

@media (max-width: 360px) {
  .pay-brandbar-logo {
    width: 140px;
  }
}
