/* =====================================================
   BIVA INTERNET — USAGE PAGE
   FULL REPLACEMENT
===================================================== */


/* =====================================================
   PAGE
===================================================== */

.internet-usage-page {
  width: 100%;
  min-height: 100vh;

  padding: 24px;

  background:
    radial-gradient(
      circle at 10% 8%,
      rgba(37, 99, 235, 0.08),
      transparent 32%
    ),
    linear-gradient(
      180deg,
      #f5f7fb,
      #edf2f7
    );
}

.internet-usage-container {
  width: min(1180px, 100%);

  margin: 0 auto;
}


/* =====================================================
   BACK BUTTON
===================================================== */

.internet-usage-back-btn {
  width: fit-content;
  min-height: 42px;

  margin-bottom: 16px;
  padding: 0 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  border:
    1px solid #dbe4ee;

  border-radius: 11px;

  color:
    #334155;

  background:
    #ffffff;

  box-shadow:
    0 5px 15px
    rgba(15, 23, 42, 0.045);

  font: inherit;

  font-size: 11px;
  font-weight: 830;

  cursor: pointer;

  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.internet-usage-back-btn:hover {
  border-color:
    #bfdbfe;

  color:
    #1d4ed8;

  background:
    #eff6ff;

  transform:
    translateX(-2px);

  box-shadow:
    0 7px 18px
    rgba(37, 99, 235, 0.08);
}

.internet-usage-back-btn svg {
  width: 17px;
  height: 17px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =====================================================
   HERO
===================================================== */

.internet-usage-hero {
  position: relative;

  min-height: 220px;

  padding: 31px 33px;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(270px, 0.4fr);

  align-items: center;

  gap: 30px;

  border:
    1px solid
    rgba(255, 255, 255, 0.08);

  border-radius: 22px;

  color:
    #ffffff;

  background:
    radial-gradient(
      circle at 94% 4%,
      rgba(37, 99, 235, 0.38),
      transparent 36%
    ),
    radial-gradient(
      circle at 4% 100%,
      rgba(251, 191, 36, 0.08),
      transparent 31%
    ),
    linear-gradient(
      145deg,
      #071324,
      #10233f 58%,
      #173675
    );

  box-shadow:
    0 22px 58px
    rgba(7, 19, 36, 0.17);

  overflow: hidden;
}

.internet-usage-hero::before {
  content: "";

  position: absolute;

  inset:
    0 0 auto 0;

  height: 4px;

  background:
    linear-gradient(
      90deg,
      #2563eb,
      #fbbf24,
      transparent 84%
    );
}

.internet-usage-hero::after {
  content: "";

  position: absolute;

  width: 240px;
  height: 240px;

  right: -96px;
  bottom: -180px;

  border:
    1px solid
    rgba(255, 255, 255, 0.05);

  border-radius: 50%;

  box-shadow:
    0 0 0 42px
    rgba(255, 255, 255, 0.018),

    0 0 0 84px
    rgba(255, 255, 255, 0.009);

  pointer-events: none;
}

.internet-usage-hero > * {
  position: relative;

  z-index: 1;
}

.internet-usage-hero > div:first-child {
  min-width: 0;
}

.internet-usage-kicker {
  display: block;

  margin-bottom: 8px;

  color:
    #fbbf24;

  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.internet-usage-hero h1 {
  margin: 0;

  color:
    #ffffff;

  font-size:
    clamp(2.4rem, 4.5vw, 4.2rem);

  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.internet-usage-hero
> div:first-child > p {
  max-width: 700px;

  margin:
    14px 0 0;

  color:
    rgba(255, 255, 255, 0.66);

  font-size: 13px;
  line-height: 1.65;
}


/* =====================================================
   HERO NOTE
===================================================== */

.internet-usage-hero-note {
  min-width: 0;

  padding: 18px;

  display: grid;

  grid-template-columns:
    43px
    minmax(0, 1fr);

  align-items: start;

  gap: 12px;

  border:
    1px solid
    rgba(255, 255, 255, 0.14);

  border-radius: 17px;

  background:
    rgba(255, 255, 255, 0.075);

  backdrop-filter:
    blur(12px);
}

.internet-usage-hero-note > span {
  width: 43px;
  height: 43px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  color:
    #dbeafe;

  background:
    rgba(37, 99, 235, 0.22);
}

.internet-usage-hero-note svg {
  width: 20px;
  height: 20px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.internet-usage-hero-note strong {
  display: block;

  color:
    #ffffff;

  font-size: 12px;
  font-weight: 870;
}

.internet-usage-hero-note p {
  margin:
    5px 0 0;

  color:
    rgba(255, 255, 255, 0.62);

  font-size: 10px;
  line-height: 1.58;
}


/* =====================================================
   CONTENT
===================================================== */

#internetUsageContent {
  margin-top: 18px;
}


/* =====================================================
   MAIN PLAN CARD
===================================================== */

.internet-usage-plan-card {
  border:
    1px solid #dce5ef;

  border-radius: 19px;

  background:
    #ffffff;

  box-shadow:
    0 10px 30px
    rgba(15, 23, 42, 0.06);

  overflow: hidden;
}


/* =====================================================
   PLAN HEADER
===================================================== */

.internet-usage-plan-header {
  padding:
    22px 24px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 22px;

  border-bottom:
    1px solid #e2e8f0;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(37, 99, 235, 0.06),
      transparent 38%
    ),
    #f8fafc;
}

.internet-usage-plan-header > div {
  min-width: 0;
}

.internet-usage-plan-header
> div > span {
  display: block;

  margin-bottom: 5px;

  color:
    #2563eb;

  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.internet-usage-plan-header h2 {
  margin: 0;

  color:
    #0f172a;

  font-size:
    clamp(1.5rem, 2.6vw, 2.2rem);

  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.internet-usage-plan-header p {
  max-width: 650px;

  margin:
    7px 0 0;

  color:
    #64748b;

  font-size: 10px;
  line-height: 1.55;
}


/* =====================================================
   STATUS BADGE
===================================================== */

.internet-usage-status {
  width: fit-content;
  min-height: 30px;

  padding:
    5px 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid #e2e8f0;

  border-radius: 999px;

  color:
    #475569;

  background:
    #f8fafc;

  font-size: 8px;
  font-weight: 850;

  white-space: nowrap;
}

.internet-usage-status.status-active {
  border-color:
    #bbf7d0;

  color:
    #047857;

  background:
    #ecfdf5;
}

.internet-usage-status.status-expired,
.internet-usage-status.status-suspended,
.internet-usage-status.status-cancelled {
  border-color:
    #fecaca;

  color:
    #b91c1c;

  background:
    #fff1f2;
}

.internet-usage-status.status-pending,
.internet-usage-status.status-pending_activation,
.internet-usage-status.status-pending_device_authorization {
  border-color:
    #fde68a;

  color:
    #92400e;

  background:
    #fffbeb;
}


/* =====================================================
   NOTICE
===================================================== */

.internet-usage-notice {
  margin:
    20px 22px 0;

  padding:
    14px;

  display: grid;

  grid-template-columns:
    39px
    minmax(0, 1fr);

  align-items: start;

  gap: 12px;

  border:
    1px solid #bfdbfe;

  border-radius: 13px;

  color:
    #1d4ed8;

  background:
    #eff6ff;
}

.internet-usage-notice > span {
  width: 39px;
  height: 39px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background:
    rgba(37, 99, 235, 0.08);
}

.internet-usage-notice svg {
  width: 19px;
  height: 19px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.internet-usage-notice strong {
  display: block;

  font-size: 11px;
  font-weight: 860;
}

.internet-usage-notice p {
  margin:
    4px 0 0;

  color:
    currentColor;

  font-size: 9px;
  line-height: 1.55;
}

.internet-usage-notice[data-type="warning"] {
  border-color:
    #fde68a;

  color:
    #92400e;

  background:
    #fffbeb;
}

.internet-usage-notice[data-type="danger"] {
  border-color:
    #fecaca;

  color:
    #b91c1c;

  background:
    #fff1f2;
}


/* =====================================================
   PROGRESS CARD
===================================================== */

.internet-usage-progress-card {
  margin:
    20px 22px 0;

  padding: 19px;

  border:
    1px solid #dbeafe;

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #ffffff
    );
}

.internet-usage-progress-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;
}

.internet-usage-progress-header
> div {
  min-width: 0;
}

.internet-usage-progress-header
> div span {
  display: block;

  margin-bottom: 5px;

  color:
    #64748b;

  font-size: 9px;
  font-weight: 780;
}

.internet-usage-progress-header
> div strong {
  color:
    #0f172a;

  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.internet-usage-progress-header p {
  margin: 0;

  color:
    #475569;

  font-size: 10px;
  font-weight: 760;

  text-align: right;
}


/* =====================================================
   PROGRESS TRACK
===================================================== */

.internet-usage-progress-track {
  width: 100%;
  height: 15px;

  margin-top: 17px;

  border:
    1px solid #dbe4ee;

  border-radius: 999px;

  background:
    #eaf0f6;

  overflow: hidden;
}

.internet-usage-progress-track > span {
  display: block;

  width: 0;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #2563eb,
      #1d4ed8
    );

  box-shadow:
    0 0 14px
    rgba(37, 99, 235, 0.24);

  transition:
    width 0.45s ease;
}


/* =====================================================
   PROGRESS FOOTER
===================================================== */

.internet-usage-progress-footer {
  margin-top: 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  color:
    #64748b;

  font-size: 9px;
}

.internet-usage-progress-footer
strong {
  color:
    #0f172a;

  font-weight: 850;
}


/* =====================================================
   METRICS
===================================================== */

.internet-usage-metrics {
  padding:
    20px 22px;

  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 12px;
}

.internet-usage-metric {
  min-width: 0;
  min-height: 132px;

  padding: 16px;

  display: grid;

  grid-template-columns:
    42px
    minmax(0, 1fr);

  align-items: start;

  gap: 11px;

  border:
    1px solid #e2e8f0;

  border-radius: 15px;

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fafc
    );
}

.internet-usage-metric-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  color:
    #1d4ed8;

  background:
    #eff6ff;
}

.internet-usage-metric-icon svg {
  width: 20px;
  height: 20px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.internet-usage-metric > div {
  min-width: 0;

  display: grid;

  align-content: start;

  gap: 6px;
}

.internet-usage-metric small {
  color:
    #64748b;

  font-size: 8px;
  font-weight: 790;
}

.internet-usage-metric strong {
  color:
    #0f172a;

  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;

  overflow-wrap: anywhere;
}

.internet-usage-metric p {
  margin: 0;

  color:
    #94a3b8;

  font-size: 8px;
  line-height: 1.45;
}


/* =====================================================
   ACTIONS
===================================================== */

.internet-usage-actions {
  padding:
    17px 22px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 9px;

  border-top:
    1px solid #e2e8f0;

  background:
    #f8fafc;
}


/* =====================================================
   BUTTONS
===================================================== */

.internet-usage-primary-btn,
.internet-usage-secondary-btn {
  min-height: 43px;

  padding:
    0 15px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  border-radius: 11px;

  font: inherit;

  font-size: 10px;
  font-weight: 840;

  white-space: nowrap;

  cursor: pointer;

  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

.internet-usage-primary-btn {
  border:
    1px solid #2563eb;

  color:
    #ffffff;

  background:
    #2563eb;

  box-shadow:
    0 7px 18px
    rgba(37, 99, 235, 0.2);
}

.internet-usage-primary-btn:hover {
  border-color:
    #1d4ed8;

  background:
    #1d4ed8;

  transform:
    translateY(-1px);
}

.internet-usage-secondary-btn {
  border:
    1px solid #cbd5e1;

  color:
    #334155;

  background:
    #ffffff;
}

.internet-usage-secondary-btn:hover {
  border-color:
    #94a3b8;

  color:
    #0f172a;

  background:
    #f1f5f9;
}

.internet-usage-primary-btn:disabled,
.internet-usage-secondary-btn:disabled {
  opacity: 0.55;

  cursor: wait;

  transform: none;

  box-shadow: none;
}

.internet-usage-primary-btn svg,
.internet-usage-secondary-btn svg {
  width: 16px;
  height: 16px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =====================================================
   EMPTY STATE
===================================================== */

.internet-usage-empty {
  min-height: 410px;

  padding: 48px 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border:
    1px solid #dce5ef;

  border-radius: 19px;

  background:
    #ffffff;

  box-shadow:
    0 10px 30px
    rgba(15, 23, 42, 0.06);

  text-align: center;
}

.internet-usage-empty > span {
  width: 68px;
  height: 68px;

  margin-bottom: 16px;

  display: grid;
  place-items: center;

  border-radius: 20px;

  color:
    #1d4ed8;

  background:
    #eff6ff;
}

.internet-usage-empty svg {
  width: 31px;
  height: 31px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.internet-usage-empty h2 {
  margin: 0;

  color:
    #0f172a;

  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.internet-usage-empty p {
  max-width: 520px;

  margin:
    9px auto 0;

  color:
    #64748b;

  font-size: 10px;
  line-height: 1.65;
}

.internet-usage-empty-actions {
  margin-top: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 9px;
}


/* =====================================================
   LOADING
===================================================== */

.internet-usage-loading {
  min-height: 400px;

  padding: 44px 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border:
    1px solid #dce5ef;

  border-radius: 19px;

  background:
    #ffffff;

  box-shadow:
    0 10px 30px
    rgba(15, 23, 42, 0.06);

  text-align: center;
}

.internet-usage-loading
> span {
  width: 39px;
  height: 39px;

  margin-bottom: 14px;

  border:
    3px solid
    rgba(37, 99, 235, 0.14);

  border-top-color:
    #2563eb;

  border-radius: 50%;

  animation:
    internet-usage-spin
    760ms linear infinite;
}

@keyframes internet-usage-spin {

  to {
    transform:
      rotate(360deg);
  }

}

.internet-usage-loading strong {
  color:
    #0f172a;

  font-size: 13px;
  font-weight: 880;
}

.internet-usage-loading p {
  max-width: 430px;

  margin:
    7px auto 0;

  color:
    #64748b;

  font-size: 9px;
  line-height: 1.55;
}


/* =====================================================
   FOCUS
===================================================== */

.internet-usage-page
button:focus-visible {
  outline: 0;

  box-shadow:
    0 0 0 3px
    rgba(37, 99, 235, 0.18);
}


/* =====================================================
   MEDIUM DESKTOP
===================================================== */

@media (max-width: 1050px) {

  .internet-usage-metrics {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

  .internet-usage-page {
    padding: 16px;
  }

  .internet-usage-hero {
    min-height: auto;

    padding:
      27px 23px;

    grid-template-columns: 1fr;
  }

  .internet-usage-hero-note {
    max-width: 530px;
  }

}


/* =====================================================
   SMALL TABLET
===================================================== */

@media (max-width: 700px) {

  .internet-usage-plan-header {
    align-items: flex-start;
    flex-direction: column;

    gap: 13px;
  }

  .internet-usage-progress-header {
    align-items: flex-start;
    flex-direction: column;

    gap: 7px;
  }

  .internet-usage-progress-header p {
    text-align: left;
  }

  .internet-usage-actions {
    display: grid;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .internet-usage-primary-btn,
  .internet-usage-secondary-btn {
    width: 100%;
  }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 560px) {

  .internet-usage-page {
    padding: 11px;
  }

  .internet-usage-back-btn {
    width: 100%;

    margin-bottom: 11px;
  }

  .internet-usage-hero {
    padding:
      23px 17px;

    border-radius: 18px;
  }

  .internet-usage-hero h1 {
    font-size:
      clamp(2.1rem, 11vw, 3.15rem);
  }

  .internet-usage-hero
  > div:first-child > p {
    font-size: 12px;
  }

  .internet-usage-hero-note {
    grid-template-columns:
      38px
      minmax(0, 1fr);

    padding: 14px;
  }

  .internet-usage-hero-note
  > span {
    width: 38px;
    height: 38px;
  }

  #internetUsageContent {
    margin-top: 12px;
  }

  .internet-usage-plan-card,
  .internet-usage-empty,
  .internet-usage-loading {
    border-radius: 16px;
  }

  .internet-usage-plan-header {
    padding:
      19px 16px;
  }

  .internet-usage-notice,
  .internet-usage-progress-card {
    margin-right: 15px;
    margin-left: 15px;
  }

  .internet-usage-progress-card {
    padding: 16px;
  }

  .internet-usage-progress-footer {
    align-items: flex-start;
    flex-direction: column;

    gap: 5px;
  }

  .internet-usage-metrics {
    padding:
      16px 15px;

    grid-template-columns: 1fr;
  }

  .internet-usage-metric {
    min-height: 110px;
  }

  .internet-usage-actions {
    padding: 14px;

    grid-template-columns: 1fr;
  }

  .internet-usage-empty {
    min-height: 360px;

    padding:
      40px 18px;
  }

  .internet-usage-empty-actions {
    width: 100%;

    display: grid;

    grid-template-columns: 1fr;
  }

}


/* =====================================================
   VERY SMALL MOBILE
===================================================== */

@media (max-width: 380px) {

  .internet-usage-hero-note {
    grid-template-columns: 1fr;
  }

  .internet-usage-notice {
    grid-template-columns: 1fr;
  }

}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

  .internet-usage-back-btn,
  .internet-usage-progress-track
  > span,
  .internet-usage-primary-btn,
  .internet-usage-secondary-btn {
    transition: none;
  }

  .internet-usage-loading
  > span {
    animation: none;
  }

}