.cmobile-m2m-plans {
  --m2m-ink: #363636;
  --m2m-muted: #66727a;
  --m2m-line: #e6e6e6;
  --m2m-blue: #0079a6;
  --m2m-blue-dark: #005f82;
  --m2m-head: var(--m2m-blue);
  --m2m-focus: #f2b705;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--m2m-ink);
  font-family: inherit;
}

.cmobile-m2m-plans *,
.cmobile-m2m-plans *::before,
.cmobile-m2m-plans *::after {
  box-sizing: border-box;
}

.cmobile-m2m-plans__scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--m2m-line);
  border-radius: 12px;
  background: #fff;
}

.cmobile-m2m-plans .cmobile-m2m-plans__table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  table-layout: fixed;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.cmobile-m2m-plans__table th,
.cmobile-m2m-plans__table td {
  min-width: 0;
  padding: 16px 24px;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid var(--m2m-line);
  border-right: 1px solid var(--m2m-line);
  overflow-wrap: anywhere;
}

/* Table header colours match the network colours on the Lift phone plan cards. */
.cmobile-m2m-plans[data-network="vodafone"] {
  --m2m-head: #cf0101;
}

.cmobile-m2m-plans[data-network="optus"] {
  --m2m-head: #016348;
}

.cmobile-m2m-plans__table thead th {
  background: var(--m2m-head);
  color: #fff;
  font-size: inherit;
  font-weight: 700;
  text-align: left;
}

.cmobile-m2m-plans__table thead th:first-child {
  width: 30%;
  border-radius: 11px 0 0;
}

.cmobile-m2m-plans__table thead th:nth-child(2) {
  width: 35%;
}

.cmobile-m2m-plans__table thead th:last-child {
  width: 35%;
  border-radius: 0 11px 0 0;
}

.cmobile-m2m-plans__table tbody tr {
  position: relative;
  background: #fff;
}

.cmobile-m2m-plans__table tbody tr:nth-child(odd) {
  background: #f8f8f8;
}

.cmobile-m2m-plans__table tr > :last-child {
  border-right: 0;
}

.cmobile-m2m-plans__table tbody tr:last-child > * {
  border-bottom: 0;
}

.cmobile-m2m-plans__table tbody th[scope="row"] {
  color: var(--m2m-ink);
  font-size: inherit;
  font-weight: 400;
  text-align: left;
}

.cmobile-m2m-plans__price {
  display: inline-block;
  color: var(--m2m-ink);
  font-size: inherit;
  font-weight: 400;
  white-space: nowrap;
}

.cmobile-m2m-plans__frequency {
  display: inline-block;
  margin-left: 4px;
  color: var(--m2m-muted);
  font-size: 0.875em;
  white-space: nowrap;
}

.cmobile-m2m-plans__action {
  text-align: left;
}

.cmobile-m2m-plans__quantity {
  display: grid;
  grid-template-columns: 44px minmax(58px, 1fr) 44px;
  width: min(100%, 174px);
  min-width: 0;
  min-height: 46px;
  overflow: visible;
  border: 1px solid var(--m2m-line);
  border-radius: 999px;
  background: #fff;
}

.cmobile-m2m-plans button.cmobile-m2m-plans__quantity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--m2m-blue);
  font-family: inherit;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.cmobile-m2m-plans button.cmobile-m2m-plans__quantity-button:hover:not(:disabled) {
  background: var(--m2m-blue);
  color: #fff;
}

.cmobile-m2m-plans button.cmobile-m2m-plans__quantity-button:disabled {
  color: #aab4b9;
  cursor: not-allowed;
}

.cmobile-m2m-plans button.cmobile-m2m-plans__quantity-button:focus-visible,
.cmobile-m2m-plans .cmobile-m2m-plans__quantity-input:focus-visible,
.cmobile-m2m-plans .cmobile-m2m-plans__cart-link:focus-visible {
  outline: 3px solid var(--m2m-focus);
  outline-offset: 2px;
}

.cmobile-m2m-plans .cmobile-m2m-plans__quantity-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-right: 1px solid var(--m2m-line);
  border-left: 1px solid var(--m2m-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: var(--m2m-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 44px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.cmobile-m2m-plans__quantity-input::-webkit-inner-spin-button,
.cmobile-m2m-plans__quantity-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.cmobile-m2m-plans__cart-state {
  display: block;
  margin-top: 6px;
  color: var(--m2m-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.cmobile-m2m-plans__cart-state:empty {
  margin: 0;
}

.cmobile-m2m-plans__cart-state--error {
  color: #a12622;
}

.cmobile-m2m-plans__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 14px;
}

.cmobile-m2m-plans__tax-note,
.cmobile-m2m-plans__message {
  margin: 0;
  color: var(--m2m-muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cmobile-m2m-plans__tax-note {
  flex: 1 1 320px;
}

.cmobile-m2m-plans__cart-summary {
  display: flex;
  flex: 1 1 330px;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--m2m-ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-align: right;
}

.cmobile-m2m-plans__cart-summary-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  overflow-wrap: anywhere;
}

.cmobile-m2m-plans__setup-summary {
  color: var(--m2m-blue-dark);
  font-size: 12px;
}

.cmobile-m2m-plans__setup-summary[hidden] {
  display: none !important;
}

.cmobile-m2m-plans__cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 17px;
  border-radius: 999px;
  background: var(--m2m-blue);
  color: #fff !important;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

.cmobile-m2m-plans__cart-link:hover {
  background: var(--m2m-blue-dark);
  color: #fff !important;
}

.cmobile-m2m-plans__cart-link[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .cmobile-m2m-plans__table th,
  .cmobile-m2m-plans__table td {
    padding: 16px 14px;
  }

  .cmobile-m2m-plans__table thead th:first-child {
    width: 25%;
  }

  .cmobile-m2m-plans__table thead th:nth-child(2) {
    width: 25%;
  }

  .cmobile-m2m-plans__table thead th:last-child {
    width: 50%;
  }

}

@media (max-width: 760px) {
  .cmobile-m2m-plans__scroll {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .cmobile-m2m-plans .cmobile-m2m-plans__table,
  .cmobile-m2m-plans__table tbody {
    display: block;
    width: 100%;
  }

  .cmobile-m2m-plans__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .cmobile-m2m-plans__table tbody {
    display: grid;
    gap: 12px;
  }

  .cmobile-m2m-plans__table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(124px, auto);
    gap: 18px 16px;
    width: 100%;
    min-width: 0;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--m2m-line);
    border-radius: 6px;
  }

  .cmobile-m2m-plans__table th,
  .cmobile-m2m-plans__table td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .cmobile-m2m-plans__table tbody th[scope="row"] {
    width: auto;
    align-self: end;
    font-size: inherit;
  }

  .cmobile-m2m-plans__table tbody th[scope="row"]::before,
  .cmobile-m2m-plans__table tbody td:not(.cmobile-m2m-plans__action)::before {
    display: block;
    margin-bottom: 5px;
    color: var(--m2m-muted);
    content: attr(data-label);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
  }

  .cmobile-m2m-plans__action {
    grid-column: 1 / -1;
    padding-top: 15px !important;
    border-top: 1px solid var(--m2m-line) !important;
  }

  .cmobile-m2m-plans__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cmobile-m2m-plans__tax-note,
  .cmobile-m2m-plans__cart-summary {
    flex-basis: auto;
  }

  .cmobile-m2m-plans__cart-summary {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .cmobile-m2m-plans__table tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px;
  }

  .cmobile-m2m-plans__quantity {
    width: min(100%, 190px);
  }

  .cmobile-m2m-plans__cart-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmobile-m2m-plans button.cmobile-m2m-plans__quantity-button,
  .cmobile-m2m-plans__cart-link {
    transition: none;
  }
}
