/* ========================================
   BIVA V2 — FULL-SCREEN SUCCESS PAGE
======================================== */



/* Loaded success content must occupy
   the complete desktop width */

.connect-success-content {
  width: 100%;
  max-width: none;
  min-width: 0;

  margin: 0;
  padding: 0;
}




/* ========================================
   SUCCESS PAGE SHELL RESET
======================================== */

body:has(.connect-success-page) {
  overflow-x: hidden;
}

body:has(.connect-success-page) .portal-shell {
  width: 100%;
  min-height: 100vh;

  display: block;

  padding: 0;
}

body:has(.connect-success-page) .portal-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 100vh;

  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;

  box-shadow: none;
  backdrop-filter: none;
}


/* ========================================
   PAGE ROOT
======================================== */

.connect-success-page {
  width: 100%;
  min-width: 0;
  min-height: 100vh;

  background:
    radial-gradient(circle at 8% 0%,
      rgba(53, 112, 243, 0.08),
      transparent 32%),
    radial-gradient(circle at 100% 0%,
      rgba(242, 183, 5, 0.07),
      transparent 28%),
    linear-gradient(180deg,
      #f8faff 0%,
      #eef3fb 100%);
}


/* ========================================
   FULL-SCREEN SUCCESS CONTAINER
======================================== */

.connect-success-card,
.connect-success-card.ui-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 100vh;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 0;

  background: #ffffff;

  box-shadow: none;

  overflow: hidden;
}


/* ========================================
   SUCCESS HERO
======================================== */

.connect-success-hero {
  position: relative;

  width: 100%;
  min-height: 220px;

  padding:
    clamp(38px, 4.5vw, 72px) clamp(28px, 6vw, 96px);

  display: grid;

  grid-template-columns:
    auto minmax(0, 1fr) auto;

  align-items: center;

  gap:
    clamp(22px, 3vw, 42px);

  color: #ffffff;

  background:
    radial-gradient(circle at 90% 8%,
      rgba(53, 112, 243, 0.42),
      transparent 34%),
    radial-gradient(circle at 10% 100%,
      rgba(242, 183, 5, 0.08),
      transparent 30%),
    linear-gradient(135deg,
      var(--biva-black) 0%,
      var(--biva-black-soft) 54%,
      #153578 100%);

  overflow: hidden;
}

.connect-success-hero::before {
  content: "";

  position: absolute;
  inset: 0 0 auto 0;

  height: 4px;

  background:
    linear-gradient(90deg,
      var(--biva-blue-500),
      var(--biva-yellow-400),
      transparent 88%);
}

.connect-success-hero::after {
  content: "";

  position: absolute;

  width: 360px;
  height: 360px;

  right: -130px;
  bottom: -255px;

  border:
    1px solid rgba(255, 255, 255, 0.07);

  border-radius: 50%;

  box-shadow:
    0 0 0 64px rgba(255, 255, 255, 0.025),

    0 0 0 128px rgba(255, 255, 255, 0.014);

  pointer-events: none;
}

.connect-success-hero > * {
  position: relative;
  z-index: 1;
}


/* ========================================
   SUCCESS ICON
======================================== */

.connect-success-icon {
  width:
    clamp(66px, 6vw, 86px);

  height:
    clamp(66px, 6vw, 86px);

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border:
    1px solid rgba(255, 255, 255, 0.18);

  border-radius:
    clamp(20px, 2vw, 26px);

  color: #ffffff;

  background:
    linear-gradient(145deg,
      #12bb76,
      var(--biva-success));

  box-shadow:
    0 20px 42px rgba(7, 148, 85, 0.3),

    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.connect-success-icon svg {
  width:
    clamp(31px, 3vw, 41px);

  height:
    clamp(31px, 3vw, 41px);

  fill: none;

  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ========================================
   SUCCESS HEADING
======================================== */

.connect-success-heading {
  min-width: 0;
}

.connect-success-kicker {
  display: block;

  margin-bottom: 9px;

  color:
    rgba(255, 255, 255, 0.66);

  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.connect-success-heading h1 {
  max-width: 980px;

  margin: 0;

  color: #ffffff;

  font-size:
    clamp(2.0rem, 5vw, 5rem);

  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.connect-success-heading p {
  max-width: 760px;

  margin: 16px 0 0;

  color:
    rgba(255, 255, 255, 0.72);

  font-size:
    clamp(0.95rem, 1.3vw, 1.15rem);

  line-height: 1.65;
}


/* ========================================
   DELIVERED BADGE
======================================== */

.connect-success-badge {
  padding: 10px 15px;

  display: inline-flex;
  align-items: center;
  gap: 9px;

  border:
    1px solid rgba(255, 255, 255, 0.14);

  border-radius: 999px;

  color: #dcfbed;

  background:
    rgba(7, 148, 85, 0.2);

  font-size: 0.78rem;
  font-weight: 850;

  white-space: nowrap;
}

.connect-success-badge > span {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #4bdd9d;

  box-shadow:
    0 0 0 5px rgba(75, 221, 157, 0.12);
}


/* ========================================
   SUCCESS BODY
======================================== */

.connect-success-body {
  width: 100%;

  padding:
    clamp(30px, 4vw, 56px) clamp(28px, 6vw, 96px) clamp(42px, 5vw, 72px);
}


/* ========================================
   VOUCHER PANEL
======================================== */

.connect-voucher-panel {
  position: relative;

  width: 100%;

  padding:
    clamp(25px, 3vw, 42px);

  border:
    1px solid rgba(53, 112, 243, 0.2);

  border-radius:
    clamp(22px, 2vw, 30px);

  background:
    radial-gradient(circle at 94% 0%,
      rgba(53, 112, 243, 0.15),
      transparent 36%),
    linear-gradient(180deg,
      #ffffff,
      var(--biva-blue-50));

  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.09),

    inset 0 1px 0 rgba(255, 255, 255, 0.92);

  overflow: hidden;
}

.connect-voucher-panel::before {
  content: "";

  position: absolute;
  inset: 0 0 auto 0;

  height: 4px;

  background:
    linear-gradient(90deg,
      var(--biva-black),
      var(--biva-blue-600),
      var(--biva-yellow-400));
}

.connect-voucher-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 28px;
}

.connect-voucher-label {
  display: block;

  margin-bottom: 7px;

  color:
    var(--biva-blue-600);

  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.connect-voucher-top p {
  margin: 0;

  color:
    var(--biva-muted);

  font-size: 0.9rem;
  line-height: 1.6;
}

.connect-voucher-network {
  padding: 9px 13px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  border:
    1px solid rgba(53, 112, 243, 0.14);

  border-radius: 999px;

  color:
    var(--biva-blue-700);

  background:
    rgba(255, 255, 255, 0.84);

  font-size: 0.78rem;
  font-weight: 820;

  white-space: nowrap;
}

.connect-voucher-network svg {
  width: 17px;
  height: 17px;

  fill: none;

  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connect-voucher-code-row {
  margin-top:
    clamp(22px, 3vw, 34px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 28px;
}

.connect-voucher-code {
  min-width: 0;

  overflow-wrap: anywhere;

  color:
    var(--biva-ink);

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size:
    clamp(2.6rem, 6vw, 5.4rem);

  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.1em;
}

.connect-copy-button {
  width: auto;
  min-width: 150px;

  flex: 0 0 auto;
}

.connect-copy-button svg {
  width: 18px;
  height: 18px;

  fill: none;

  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connect-copy-button.is-copied {
  color:
    var(--biva-success);

  border-color:
    rgba(7, 148, 85, 0.16);

  background:
    var(--biva-success-soft);
}

.connect-copy-feedback {
  min-height: 20px;

  margin-top: 10px;

  color:
    var(--biva-success);

  font-size: 0.78rem;
  font-weight: 750;
}


/* ========================================
   INFORMATION GRID
======================================== */

.connect-details-grid {
  width: 100%;

  margin-top:
    clamp(22px, 3vw, 34px);

  display: grid;

  grid-template-columns:
    minmax(0, 1.15fr) minmax(0, 0.85fr);

  gap:
    clamp(20px, 2.5vw, 34px);

  align-items: stretch;
}


/* ========================================
   SHARED INFORMATION CARDS
======================================== */

.connect-plan-summary,
.connect-receipt-panel {
  min-width: 0;

  padding:
    clamp(22px, 2.5vw, 34px);

  border:
    1px solid var(--biva-line);

  border-radius:
    clamp(20px, 2vw, 28px);

  background:
    radial-gradient(circle at 100% 0%,
      rgba(53, 112, 243, 0.06),
      transparent 34%),
    linear-gradient(180deg,
      #ffffff,
      var(--biva-surface-soft));

  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.07);
}


/* ========================================
   PLAN SUMMARY HEADING
======================================== */

.connect-section-heading {
  display: flex;
  align-items: center;

  gap: 14px;

  margin-bottom: 22px;
}

.connect-section-icon {
  width: 46px;
  height: 46px;

  flex: 0 0 46px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  color:
    var(--biva-blue-700);

  background:
    var(--biva-blue-50);
}

.connect-section-icon svg {
  width: 22px;
  height: 22px;

  fill: none;

  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connect-section-heading span,
.connect-receipt-heading span {
  display: block;

  margin-bottom: 4px;

  color:
    var(--biva-blue-600);

  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.connect-section-heading h2,
.connect-receipt-heading h2 {
  margin: 0;

  color:
    var(--biva-ink);

  font-size:
    clamp(1.2rem, 1.8vw, 1.55rem);

  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.03em;
}


/* ========================================
   PLAN SUMMARY ITEMS
======================================== */

.connect-summary-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 14px;
}

.connect-summary-item {
  min-width: 0;

  padding:
    clamp(16px, 2vw, 22px);

  border:
    1px solid rgba(15, 23, 42, 0.055);

  border-radius:
    var(--biva-radius-lg);

  background:
    rgba(255, 255, 255, 0.78);
}

.connect-summary-item span {
  display: block;

  margin-bottom: 7px;

  color:
    var(--biva-muted);

  font-size: 0.78rem;
}

.connect-summary-item strong {
  display: block;

  overflow-wrap: anywhere;

  color:
    var(--biva-ink);

  font-size:
    clamp(0.95rem, 1.4vw, 1.16rem);

  font-weight: 820;
  line-height: 1.4;
}


/* ========================================
   ORDER SUMMARY
======================================== */

.connect-receipt-heading {
  margin-bottom: 16px;
}

.connect-receipt-row {
  min-width: 0;
  min-height: 54px;

  padding: 12px 0;

  display: grid;

  grid-template-columns:
    minmax(110px, 0.75fr) minmax(0, 1.25fr);

  align-items: center;

  gap: 18px;

  border-bottom:
    1px solid var(--biva-line);
}

.connect-receipt-row:last-child {
  border-bottom: 0;
}

.connect-receipt-row > span {
  min-width: 0;

  color:
    var(--biva-muted);

  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}

.connect-receipt-row > strong {
  min-width: 0;
  max-width: none;

  overflow-wrap: anywhere;

  color:
    var(--biva-ink);

  font-size: 0.86rem;
  font-weight: 820;
  line-height: 1.45;

  text-align: right;
}

.connect-receipt-heading + .connect-receipt-row > strong {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size: 0.8rem;
  letter-spacing: -0.02em;
}


/* ========================================
   STATUS BADGES
======================================== */

.connect-status-badge {
  width: fit-content;
  min-height: 28px;

  margin-left: auto;
  padding: 4px 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid rgba(7, 148, 85, 0.1);

  border-radius: 999px;

  font-size:
    0.67rem !important;

  font-weight:
    850 !important;

  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.connect-status-badge.is-success {
  color:
    var(--biva-success);

  background:
    var(--biva-success-soft);
}


/* ========================================
   CONNECTION TIP
======================================== */

.connect-success-tip {
  width: 100%;

  margin-top: 20px;
  padding: 15px 18px;

  display: flex;
  align-items: flex-start;

  gap: 12px;

  border:
    1px solid rgba(242, 183, 5, 0.2);

  border-radius:
    var(--biva-radius-lg);

  background:
    radial-gradient(circle at 100% 0%,
      rgba(242, 183, 5, 0.11),
      transparent 36%),
    var(--biva-yellow-50);
}

.connect-success-tip-mark {
  width: 24px;
  height: 24px;

  flex: 0 0 24px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: #4f3900;

  background:
    var(--biva-yellow-400);

  font-size: 0.75rem;
  font-weight: 900;
}

.connect-success-tip p {
  margin: 0;

  color:
    var(--biva-muted);

  font-size: 0.82rem;
  line-height: 1.55;
}

.connect-success-tip strong {
  color:
    var(--biva-ink);
}


/* ========================================
   ACTIONS
======================================== */

.connect-success-actions {
  width: 100%;

  margin-top: 18px;
}

.connect-primary-action {
  width: 100%;
}


/* ========================================
   LOADING AND ERROR STATES
======================================== */

.connect-success-loading,
.connect-result-state {
  width:
    min(100%, 680px);

  margin:
    60px auto;

  padding:
    42px 30px;

  text-align: center;
}

.connect-loading-ring {
  width: 46px;
  height: 46px;

  margin:
    0 auto 18px;

  border:
    4px solid var(--biva-blue-100);

  border-top-color:
    var(--biva-blue-600);

  border-radius: 50%;

  animation:
    connectSuccessSpin 700ms linear infinite;
}

.connect-success-loading strong {
  display: block;

  color:
    var(--biva-ink);

  font-size: 1.05rem;
}

.connect-success-loading p {
  margin:
    8px 0 0;

  color:
    var(--biva-muted);

  font-size: 0.86rem;
}

.connect-result-mark {
  width: 56px;
  height: 56px;

  margin:
    0 auto 18px;

  display: grid;
  place-items: center;

  border-radius: 18px;

  font-size: 1.5rem;
  font-weight: 900;
}

.connect-result-mark.is-warning {
  color: #6f4a00;

  background:
    var(--biva-yellow-100);
}

.connect-result-kicker {
  display: block;

  margin-bottom: 8px;

  color:
    var(--biva-blue-600);

  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.connect-result-state h1 {
  margin: 0;

  color:
    var(--biva-ink);

  font-size: 1.8rem;
}

.connect-result-state p {
  max-width: 500px;

  margin:
    14px auto 24px;

  color:
    var(--biva-muted);

  font-size: 0.88rem;
  line-height: 1.65;
}

@keyframes connectSuccessSpin {
  to {
    transform: rotate(360deg);
  }
}


/* ========================================
   LARGE DESKTOP
======================================== */

@media (min-width: 1440px) {

  .connect-success-body {
    padding-left: 7vw;
    padding-right: 7vw;
  }

  .connect-details-grid {
    grid-template-columns:
      minmax(0, 1.22fr) minmax(420px, 0.78fr);
  }

}


/* ========================================
   SHORT DESKTOP SCREENS
======================================== */

@media (min-width: 821px) and (max-height: 850px) {

  .connect-success-hero {
    min-height: 175px;

    padding-top: 30px;
    padding-bottom: 30px;
  }

  .connect-success-heading h1 {
    font-size: 3.3rem;
  }

  .connect-success-body {
    padding-top: 28px;
    padding-bottom: 34px;
  }

  .connect-voucher-panel {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .connect-voucher-code-row {
    margin-top: 18px;
  }

  .connect-voucher-code {
    font-size: 3.1rem;
  }

  .connect-plan-summary,
  .connect-receipt-panel {
    padding-top: 20px;
    padding-bottom: 20px;
  }

}


/* ========================================
   TABLET
======================================== */

@media (max-width: 980px) {

  .connect-success-hero {
    min-height: 190px;

    padding:
      34px 28px;
  }

  .connect-success-heading h1 {
    font-size: 2.8rem;
  }

  .connect-success-body {
    padding:
      30px 24px 40px;
  }

  .connect-details-grid {
    grid-template-columns: 1fr;
  }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 640px) {

  .connect-success-page,
  .connect-success-card,
  .connect-success-card.ui-card {
    min-height: 100dvh;

    border-radius: 0;
  }

  .connect-success-hero {
    min-height: auto;

    padding:
      26px 18px;

    grid-template-columns:
      auto minmax(0, 1fr);

    align-items: flex-start;

    gap: 14px;
  }

  .connect-success-icon {
    width: 48px;
    height: 48px;

    border-radius: 15px;
  }

  .connect-success-icon svg {
    width: 24px;
    height: 24px;
  }

  .connect-success-heading h1 {
    font-size: 1.75rem;
    line-height: 1.06;
  }

  .connect-success-heading p {
    margin-top: 8px;

    font-size: 0.81rem;
  }

  .connect-success-badge {
    grid-column: 1 / -1;

    width: fit-content;

    margin-left: 62px;

    padding: 7px 10px;
  }

  .connect-success-body {
    padding:
      18px 14px 24px;
  }

  .connect-voucher-panel {
    padding:
      20px 16px;

    border-radius: 20px;
  }

  .connect-voucher-top {
    flex-direction: column;

    gap: 11px;
  }

  .connect-voucher-code-row {
    margin-top: 19px;

    align-items: stretch;
    flex-direction: column;

    gap: 15px;
  }

  .connect-voucher-code {
    font-size: 2.15rem;

    text-align: center;
  }

  .connect-copy-button {
    width: 100%;
  }

  .connect-details-grid {
    margin-top: 14px;

    gap: 14px;
  }

  .connect-plan-summary,
  .connect-receipt-panel {
    width: 100%;

    padding: 17px;

    border-radius: 19px;
  }

  .connect-summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 9px;
  }

  .connect-summary-item {
    padding: 13px;
  }

  .connect-receipt-row {
    min-height: 44px;

    padding: 10px 0;

    grid-template-columns:
      minmax(78px, 0.72fr) minmax(0, 1.28fr);

    gap: 10px;
  }

  .connect-receipt-row > span {
    font-size: 0.7rem;
  }

  .connect-receipt-row > strong {
    font-size: 0.75rem;
  }

  .connect-receipt-heading + .connect-receipt-row {
    grid-template-columns: 1fr;

    gap: 5px;
  }

  .connect-receipt-heading + .connect-receipt-row > strong {
    width: 100%;

    text-align: left;
  }

  .connect-success-tip {
    margin-top: 13px;

    padding: 12px 13px;
  }

  .connect-success-actions {
    margin-top: 13px;
  }

}


/* ========================================
   VERY SMALL PHONES
======================================== */

@media (max-width: 390px) {

  .connect-success-hero {
    padding:
      23px 15px;
  }

  .connect-success-heading h1 {
    font-size: 1.55rem;
  }

  .connect-success-badge {
    margin-left: 58px;
  }

  .connect-success-body {
    padding:
      15px 11px 22px;
  }

  .connect-voucher-code {
    font-size: 1.82rem;
  }

  .connect-summary-grid {
    grid-template-columns: 1fr;
  }

  .connect-receipt-panel {
    padding: 14px;
  }

  .connect-receipt-row {
    grid-template-columns:
      minmax(72px, 0.72fr) minmax(0, 1.28fr);
  }

  .connect-status-badge {
    font-size:
      0.61rem !important;
  }

}


/* ========================================
   ACCESSIBILITY
======================================== */

@media (prefers-reduced-motion: reduce) {

  .connect-loading-ring {
    animation: none;
  }

}