/* Focused refinements: plan selection, periods, home locations and the hero. */
.period-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

#tariff-panel .period-grid > .price-card {
  grid-column: span 2;
  grid-row: auto;
}

#tariff-panel .period-grid > .price-card:nth-child(4) {
  grid-column: 2 / span 2;
}

#tariff-panel .period-grid > .price-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.compact-period-card {
  display: none;
}

@media (max-width: 900px) and (min-width: 601px) {
  .period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tariff-panel .period-grid > .price-card {
    grid-column: auto;
  }

  #tariff-panel .period-grid > .price-card:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 6px);
  }
}

@media (max-width: 600px) {
  .period-grid {
    grid-template-columns: 1fr;
  }

  #tariff-panel .period-grid > .price-card,
  #tariff-panel .period-grid > .price-card:nth-child(4),
  #tariff-panel .period-grid > .price-card:nth-child(5) {
    grid-column: auto;
    width: auto;
  }

  #tariff-panel .period-grid > .price-card[data-period-card="7"] {
    order: 1;
  }

  #tariff-panel .period-grid > .price-card[data-period-card="1"] {
    order: 2;
  }

  #tariff-panel .period-grid > .price-card[data-period-card="3"] {
    order: 3;
  }

  #tariff-panel .period-grid > .price-card[data-period-card="12"] {
    order: 4;
  }

  #tariff-panel .period-grid > .price-card[data-period-card="6"] {
    order: 5;
  }

  #tariff-panel .period-grid > .price-card[data-period-card="7"],
  #tariff-panel .period-grid > .price-card[data-period-card="6"] {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 11px;
    background: linear-gradient(115deg, #163d50, #102b40);
  }

  #tariff-panel .price-card[data-period-card="7"] > :not(.compact-period-card),
  #tariff-panel .price-card[data-period-card="6"] > :not(.compact-period-card) {
    display: none;
  }

  .compact-period-card {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 11px 15px;
    border: 0;
    background: transparent;
    color: #c7fcff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
  }

  .compact-period-card strong {
    color: #e4ffff;
    font-weight: 800;
    white-space: nowrap;
  }

  .compact-period-card .icon {
    width: 17px;
    height: 17px;
    color: var(--cyan);
  }
}

.plan-tabs {
  gap: 7px;
  padding: 6px;
}

.plan-tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 86px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 12px;
}

.plan-tab .plan-name {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.025em;
  color: #dcebf8;
  white-space: normal;
  word-break: normal;
  hyphens: none;
}

.plan-tab small {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
}

.plan-tab[aria-selected="true"] .plan-name {
  color: var(--text);
}

.plan-tab-featured {
  border-color: rgba(83, 232, 242, .5);
  background: rgba(40, 130, 154, .12);
  box-shadow: 0 0 19px rgba(60, 207, 224, .1), inset 0 1px 0 rgba(186, 251, 255, .06);
}

.plan-tab-featured .plan-name {
  color: #d4fcff;
}

.plan-tab-featured[aria-selected="true"] {
  border-color: #75edf4;
  background: linear-gradient(145deg, #17465b, #123047);
  box-shadow: 0 0 25px rgba(60, 207, 224, .2), inset 0 1px 0 rgba(213, 253, 255, .13);
}

.plan-priority {
  position: absolute;
  top: -11px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid rgba(117, 237, 244, .65);
  border-radius: 999px;
  background: #164c5d;
  color: #d5fdff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .015em;
  white-space: nowrap;
  transform: translateX(-50%);
}

#tariff-panel[data-active-plan="family"] .price-card:not(.popular) {
  border-color: rgba(83, 232, 242, .3);
  box-shadow: inset 0 1px 0 rgba(142, 244, 250, .04);
}

#tariff-panel[data-active-plan="family"] .price-card:not(.popular):hover {
  border-color: rgba(83, 232, 242, .55);
}

.location-smart-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  max-width: 920px;
  margin: -22px auto 24px;
  padding: 17px 19px;
  border: 1px solid rgba(83, 232, 242, .38);
  border-radius: 17px;
  background: linear-gradient(115deg, rgba(19, 57, 75, .92), rgba(10, 29, 48, .94));
  box-shadow: inset 0 1px 0 rgba(190, 252, 255, .04), 0 14px 36px rgba(0, 8, 25, .2);
}

.location-smart-choice-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(83, 232, 242, .34);
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(83, 232, 242, .08);
}

.location-smart-choice-icon .icon {
  width: 22px;
  height: 22px;
}

.location-smart-choice-kicker {
  display: block;
  margin-bottom: 3px;
  color: #9fdce3;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.location-smart-choice strong {
  display: block;
  color: #e0fdff;
  font-size: 17px;
  line-height: 1.45;
}

.location-smart-choice p {
  margin: 5px 0 0;
  color: #b3ccdb;
  font-size: 11px;
  line-height: 1.65;
}

.location-smart-choice .text-link {
  min-height: 44px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .location-smart-choice {
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 10px 12px;
    margin: -4px auto 21px;
    padding: 15px 14px;
    border-radius: 15px;
  }

  .location-smart-choice-icon {
    width: 35px;
    height: 35px;
    border-radius: 10px;
  }

  .location-smart-choice-icon .icon {
    width: 19px;
    height: 19px;
  }

  .location-smart-choice-kicker {
    font-size: 8px;
  }

  .location-smart-choice strong {
    font-size: 15px;
  }

  .location-smart-choice p {
    font-size: 10px;
  }

  .location-smart-choice .text-link {
    grid-column: 2;
    justify-self: start;
  }
}

#home-locations.location-grid {
  gap: 12px;
  margin-right: auto;
  margin-left: auto;
}

#home-locations[data-expanded="false"] {
  max-width: 720px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#home-locations[data-expanded="false"] .location:nth-child(n + 4),
#home-locations .location[hidden] {
  display: none !important;
}

#home-locations[data-expanded="true"] {
  max-width: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#home-locations .location {
  min-width: 0;
  min-height: 98px;
  padding: 16px 13px;
  border-radius: 15px;
}

#home-locations .location-top {
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
}

#home-locations .location-top > div {
  min-width: 0;
}

#home-locations .flag {
  flex: 0 0 auto;
  font-size: 25px;
  line-height: 1.2;
}

#home-locations .location h3 {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.01em;
  word-break: normal;
  hyphens: none;
}

#home-locations .location-tag {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

#home-locations .location > p,
#home-locations .location-tags {
  display: none;
}

.location-more[data-action="more-locations"] {
  display: flex;
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 20px auto 0;
  padding: 10px 18px;
  font-size: 13px;
  line-height: 1.45;
}

.hero .hero-intro {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

@media (max-width: 1100px) {
  #home-locations[data-expanded="true"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  #home-locations[data-expanded="true"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .plan-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
  }

  .plan-tab {
    min-height: 85px;
    padding: 15px 10px;
  }

  .plan-tab .plan-name {
    font-size: 20px;
  }

  .plan-tab small {
    font-size: 11.5px;
  }

  #tab-corporate {
    grid-column: 1 / -1;
    min-height: 70px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

@media (max-width: 600px) {
  #home-locations.location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #home-locations[data-expanded="false"] .location:nth-child(3) {
    grid-column: 1 / -1;
  }

  #home-locations .location {
    min-height: 88px;
    padding: 13px 10px;
    border-radius: 13px;
  }

  #home-locations .location-top {
    gap: 8px;
  }

  #home-locations .flag {
    font-size: 23px;
  }

  #home-locations .location-tag {
    font-size: 11px;
  }

  .hero .hero-intro {
    width: 100%;
    max-width: none;
    margin: 14px auto 23px;
    font-size: 13.5px;
    line-height: 1.65;
    letter-spacing: 0;
  }
}

@media (max-width: 380px) {
  #home-locations .location-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  #home-locations .location {
    min-height: 112px;
  }
}
