/* =========================================================
   BIVA INTERNET MARKETPLACE
   Wi-Fi discovery + plans
========================================================= */

.plans-page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 28px 60px;
}


/* =========================================================
   HEADER
========================================================= */

.plans-page__header {
  margin-bottom: 38px;
}


.plans-page__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
}


.plans-page__back-btn,
.plans-page__login-btn,
.plans-page__change-wifi-btn {
  appearance: none;
  border: 1px solid #dfe5ee;
  background: #ffffff;
  color: #172033;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}


.plans-page__back-btn:hover,
.plans-page__login-btn:hover,
.plans-page__change-wifi-btn:hover {
  border-color: #00b982;
  background: #f7fffc;
  box-shadow:
    0 6px 18px
    rgba(0, 185, 130, 0.08);
}


.plans-page__back-btn:active,
.plans-page__login-btn:active,
.plans-page__change-wifi-btn:active {
  transform: translateY(1px);
}


.plans-page__intro {
  max-width: 700px;
}


.plans-page__kicker,
.plans-page__eyebrow {
  display: inline-block;
  color: #0877e6;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


.plans-page__intro h1 {
  margin: 10px 0 12px;
  color: #101827;
  font-size: clamp(
    34px,
    5vw,
    58px
  );
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 850;
}


.plans-page__intro p {
  max-width: 620px;
  margin: 0;
  color: #657084;
  font-size: 16px;
  line-height: 1.75;
}


/* =========================================================
   MARKETPLACE / SEARCH
========================================================= */

.plans-page__marketplace {
  width: 100%;
}


.plans-page__search-wrap {
  position: relative;
  max-width: 760px;
  margin-bottom: 42px;
}


.plans-page__search-wrap label {
  display: block;
  margin-bottom: 10px;
  color: #182134;
  font-size: 14px;
  font-weight: 750;
}


.plans-page__search-wrap input {
  width: 100%;
  min-height: 58px;
  box-sizing: border-box;
  border: 1px solid #dce3ed;
  outline: none;
  border-radius: 16px;
  background: #ffffff;
  padding: 0 20px;
  color: #111827;
  font: inherit;
  font-size: 15px;
  box-shadow:
    0 8px 30px
    rgba(15, 23, 42, 0.05);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.plans-page__search-wrap input::placeholder {
  color: #9aa5b5;
}


.plans-page__search-wrap input:focus {
  border-color: #00c98d;
  box-shadow:
    0 0 0 4px
    rgba(0, 201, 141, 0.1),
    0 10px 30px
    rgba(15, 23, 42, 0.05);
}


/* =========================================================
   SECTION HEADING
========================================================= */

.plans-page__section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}


.plans-page__section-heading h2 {
  margin: 7px 0 7px;
  color: #151e2f;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}


.plans-page__section-heading p {
  margin: 0;
  color: #737f91;
  font-size: 14px;
  line-height: 1.6;
}


/* =========================================================
   MARKETPLACE GRID
========================================================= */

.plans-page__grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );
  gap: 22px;
  width: 100%;
}


/* =========================================================
   WIFI LOCATION CARD
========================================================= */

.plans-page__location-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 390px;
  padding: 24px;
  border: 1px solid #e4e9f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow:
    0 8px 30px
    rgba(15, 23, 42, 0.055);
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}


.plans-page__location-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background:
    linear-gradient(
      90deg,
      #00d492,
      #0877e6
    );
}


.plans-page__location-card:hover {
  transform: translateY(-3px);
  border-color: #cdd8e5;
  box-shadow:
    0 18px 45px
    rgba(15, 23, 42, 0.09);
}


.plans-page__location-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}


.plans-page__location-card-top h2 {
  margin: 8px 0 5px;
  color: #111827;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}


.plans-page__location-ssid {
  margin: 0;
  color: #7b8798;
  font-size: 13px;
  line-height: 1.5;
}


.plans-page__location-ssid strong {
  color: #364154;
  font-weight: 750;
}


.plans-page__location-featured {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff6d9;
  color: #966600;
  font-size: 11px;
  font-weight: 800;
}


/* =========================================================
   LOCATION DETAILS
========================================================= */

.plans-page__location-info {
  margin-bottom: 20px;
}


.plans-page__location-detail {
  padding: 15px 16px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #f8fafc;
}


.plans-page__location-detail span {
  display: block;
  margin-bottom: 5px;
  color: #8792a3;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


.plans-page__location-detail strong {
  display: block;
  color: #263144;
  font-size: 13px;
  line-height: 1.55;
}


.plans-page__location-description {
  margin: 14px 2px 0;
  color: #657084;
  font-size: 13px;
  line-height: 1.65;
}


/* =========================================================
   MARKETPLACE PRICE / PLAN SUMMARY
========================================================= */

.plans-page__location-market-info {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 10px;
  margin-top: auto;
  margin-bottom: 20px;
}


.plans-page__location-stat {
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  background: #f7f9fc;
}


.plans-page__location-stat span {
  display: block;
  margin-bottom: 5px;
  color: #8994a5;
  font-size: 11px;
  font-weight: 650;
}


.plans-page__location-stat strong {
  display: block;
  color: #182134;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}


.plans-page__location-stat:last-child {
  background: #edfff8;
}


.plans-page__location-stat:last-child strong {
  color: #008b63;
  font-size: 17px;
  font-weight: 850;
}


/* =========================================================
   CARD FOOTER
========================================================= */

.plans-page__card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid #edf0f4;
}


.plans-page__location-availability {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #647083;
  font-size: 12px;
  font-weight: 650;
}


.plans-page__availability-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #00c98d;
  box-shadow:
    0 0 0 4px
    rgba(0, 201, 141, 0.12);
}


.plans-page .primary-btn {
  appearance: none;
  border: 0;
  min-height: 44px;
  padding: 0 19px;
  border-radius: 12px;
  background: #101827;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}


.plans-page .primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 9px 22px
    rgba(15, 23, 42, 0.18);
}


.plans-page .primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}


/* =========================================================
   SELECTED WIFI HEADER
========================================================= */

.plans-page__plans-section {
  width: 100%;
}


.plans-page__plans-section[hidden],
.plans-page__marketplace[hidden] {
  display: none !important;
}


.plans-page__selected-wifi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 38px;
  padding: 22px 24px;
  border: 1px solid #dceae5;
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      #f3fffb,
      #f7fbff
    );
}


.plans-page__selected-wifi h2 {
  margin: 6px 0 5px;
  color: #152033;
  font-size: 23px;
}


.plans-page__selected-wifi p {
  margin: 0;
  color: #718094;
  font-size: 13px;
  line-height: 1.5;
}


/* =========================================================
   INTERNET PLAN CARDS
========================================================= */

.plans-page__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  padding: 24px;
  border: 1px solid #e2e7ee;
  border-radius: 21px;
  background: #ffffff;
  box-shadow:
    0 8px 28px
    rgba(15, 23, 42, 0.05);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}


.plans-page__card:hover {
  transform: translateY(-3px);
  border-color: #ccd8e6;
  box-shadow:
    0 17px 42px
    rgba(15, 23, 42, 0.09);
}


.plans-page__card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}


.plans-page__card-top h2 {
  margin: 7px 0 0;
  color: #121b2b;
  font-size: 23px;
  letter-spacing: -0.025em;
}


.plans-page__data-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 62px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: #eafff7;
  color: #008b63;
  font-size: 15px;
  font-weight: 850;
}


.plans-page__features {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 10px;
  margin-bottom: 24px;
}


.plans-page__feature {
  min-width: 0;
  padding: 14px;
  border-radius: 13px;
  background: #f8fafc;
}


.plans-page__feature span {
  display: block;
  margin-bottom: 5px;
  color: #8a95a6;
  font-size: 11px;
  font-weight: 650;
}


.plans-page__feature strong {
  display: block;
  color: #293449;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}


.plans-page__price {
  min-width: 0;
}


.plans-page__price span {
  display: block;
  margin-bottom: 3px;
  color: #8a95a6;
  font-size: 11px;
  font-weight: 650;
}


.plans-page__price strong {
  display: block;
  color: #101827;
  font-size: 21px;
  font-weight: 850;
}


/* =========================================================
   LOADING / EMPTY STATE
========================================================= */

.plans-page__loading,
.plans-page__empty {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  padding: 46px 24px;
  border: 1px dashed #d9e0e9;
  border-radius: 18px;
  background: #fafbfd;
  text-align: center;
}


.plans-page__loading {
  color: #7b8798;
  font-size: 14px;
}


.plans-page__empty h2 {
  margin: 0 0 8px;
  color: #182134;
  font-size: 20px;
}


.plans-page__empty p {
  margin: 0;
  color: #7d8899;
  font-size: 14px;
  line-height: 1.6;
}


/* =========================================================
   TABLET
========================================================= */

@media (
  max-width: 1000px
) {

  .plans-page {
    padding:
      26px
      22px
      50px;
  }


  .plans-page__grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (
  max-width: 680px
) {

  .plans-page {
    padding:
      20px
      15px
      40px;
  }


  .plans-page__header {
    margin-bottom: 28px;
  }


  .plans-page__nav {
    margin-bottom: 30px;
  }


  .plans-page__intro h1 {
    font-size: 36px;
    line-height: 1.05;
  }


  .plans-page__intro p {
    font-size: 14px;
    line-height: 1.65;
  }


  .plans-page__search-wrap {
    margin-bottom: 34px;
  }


  .plans-page__search-wrap input {
    min-height: 54px;
    border-radius: 14px;
    padding:
      0
      16px;
  }


  .plans-page__section-heading {
    align-items: flex-start;
  }


  .plans-page__section-heading h2 {
    font-size: 23px;
  }


  .plans-page__grid {
    grid-template-columns:
      1fr;
    gap: 16px;
  }


  .plans-page__location-card,
  .plans-page__card {
    min-height: 0;
    padding: 20px;
    border-radius: 18px;
  }


  .plans-page__location-card-top,
  .plans-page__card-top {
    gap: 12px;
  }


  .plans-page__location-market-info,
  .plans-page__features {
    grid-template-columns:
      1fr 1fr;
  }


  .plans-page__card-footer {
    align-items: stretch;
    flex-direction: column;
  }


  .plans-page__card-footer
  .primary-btn {
    width: 100%;
  }


  .plans-page__selected-wifi {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }


  .plans-page__change-wifi-btn {
    width: 100%;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (
  max-width: 420px
) {

  .plans-page__intro h1 {
    font-size: 31px;
  }


  .plans-page__location-market-info,
  .plans-page__features {
    grid-template-columns:
      1fr;
  }


  .plans-page__location-card-top {
    flex-direction: column;
  }


  .plans-page__location-featured {
    align-self: flex-start;
  }


  .plans-page__data-badge {
    min-width: 58px;
  }

}