.subscription-page {
  min-height: calc(100vh - var(--elaw-topbar-height, 69px) - 81px);
  background:
    radial-gradient(circle at 18% 5%, rgba(36, 99, 235, 0.035), transparent 28%),
    linear-gradient(135deg, #f8faff 0%, #ffffff 42%, #f7faff 100%);
}

.subscription-page .content {
  min-height: calc(100vh - 150px);
  padding: 17px 34px 28px;
}

.subscription-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 21px;
}

.subscription-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid #d7dfec;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #1b56ef;
  font-size: 24px;
  box-shadow: 0 5px 16px rgba(32, 67, 118, 0.035);
}

.subscription-hero h1 {
  margin: 0 0 4px;
  color: #071943;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.subscription-hero p {
  margin: 0;
  color: #61708d;
  font-size: 14px;
}

.plans-grid,
.plan-skeleton {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.subscription-plan-card,
.plan-skeleton__card {
  min-width: 0;
  border: 1px solid #e2e7ef;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(25, 50, 89, 0.08);
}

.subscription-plan-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.subscription-plan-card:hover {
  transform: translateY(-2px);
  border-color: #d6dfec;
  box-shadow: 0 14px 31px rgba(25, 50, 89, 0.12);
}

.subscription-plan-card.is-current {
  border: 2px solid #1760ff;
  padding: 25px;
  box-shadow: 0 11px 27px rgba(31, 99, 231, 0.2);
}

.plan-card__head {
  display: flex;
  align-items: flex-start;
  min-height: 68px;
  gap: 18px;
}

.plan-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 12px;
  font-size: 29px;
}

.plan-card__icon--free {
  background: linear-gradient(145deg, #e8f8f3, #e4f5f0);
  color: #0ba477;
}

.plan-card__icon--pro {
  background: linear-gradient(145deg, #edf3ff, #e7edfb);
  color: #3169e8;
}

.plan-card__icon--super {
  background: linear-gradient(145deg, #ecf3ff, #e3ecff);
  color: #1d5ef1;
}

.plan-card__icon--monthly {
  background: linear-gradient(145deg, #f2eaff, #eee5fb);
  color: #8639e8;
}

.plan-card__summary {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.plan-card__name {
  overflow: hidden;
  margin-bottom: 12px;
  color: #0b1c46;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-card__price-row {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 8px;
}

.plan-card__price {
  color: #081a43;
  font-size: clamp(24px, 2.05vw, 29px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.plan-card__period {
  color: #61708d;
  font-size: 13px;
  white-space: nowrap;
}

.plan-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-left: auto;
  padding: 4px 11px;
  border: 1px solid #acc6ff;
  border-radius: 10px;
  background: #e9f1ff;
  color: #1358e8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.plan-card__badge--popular {
  border-color: #c9d7f2;
  background: #f2f6fd;
  color: #365b99;
}

.plan-card__divider {
  height: 1px;
  margin: 16px 0 15px;
  border: 0;
  background: #dce3ed;
  opacity: 1;
}

.plan-card__features {
  display: grid;
  gap: 11px;
  margin-bottom: 22px;
}

.plan-feature {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 11px;
  color: #536482;
  font-size: 13.5px;
  line-height: 1.35;
}

.plan-feature i {
  margin-top: 1px;
  flex: 0 0 auto;
  color: #07a66d;
  font-size: 17px;
}

.plan-feature__label {
  color: #415474;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.plan-feature__value {
  color: #65738d;
}

.plan-card__actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.plan-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.plan-action:not(:disabled):hover {
  transform: translateY(-1px);
}

.plan-action--primary {
  border-color: #0a38c8;
  background: linear-gradient(180deg, #103ec6 0%, #0629aa 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 5px 12px rgba(13, 52, 184, 0.16);
}

.plan-action--primary:hover,
.plan-action--primary:focus {
  background: linear-gradient(180deg, #164bd8 0%, #082ead 100%);
  color: #ffffff;
}

.plan-action--free {
  border-color: #2bad85;
  background: #ffffff;
  color: #07986c;
}

.plan-action--free:hover,
.plan-action--free:focus {
  background: #effbf7;
  color: #087b5b;
}

.plan-action--current {
  border-color: #91b3ff;
  background: #ffffff;
  color: #235fdd;
}

.plan-action--current {
  background: #f5f8ff;
}

.plan-action--current:disabled {
  cursor: default;
  opacity: 1;
}

.plan-action--free:disabled {
  cursor: not-allowed;
  border-color: #cfd8e6;
  background: #f5f7fa;
  color: #8b98ac;
  box-shadow: none;
  opacity: 1;
}

.plan-action__hint {
  display: block;
  margin-top: -1px;
  color: #7b879a;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.plan-action i {
  margin-right: 8px;
  font-size: 17px;
}

.subscription-empty,
.subscription-error {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid #e2e7ef;
  border-radius: 16px;
  background: #ffffff;
  color: #596a85;
  text-align: center;
}

.subscription-error {
  border-color: #f0c6c6;
  color: #a33232;
}

.plan-confirmation-modal .modal-dialog {
  max-width: 560px;
}

.plan-confirmation {
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(12, 31, 70, 0.24);
}

.plan-confirmation__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #e4eaf3;
}

.plan-confirmation__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #2362e7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-confirmation__header h2 {
  margin: 0;
  color: #081a43;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.plan-confirmation__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  background: #f7f9fc;
  color: #65748c;
  font-size: 20px;
}

.plan-confirmation__close:hover:not(:disabled) {
  border-color: #c7d3e5;
  background: #eef3fa;
  color: #243d67;
}

.plan-confirmation__body {
  padding: 22px 26px 20px;
}

.plan-confirmation__selected {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 17px;
  border: 1px solid #dbe5f5;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8faff 0%, #f1f6ff 100%);
}

.plan-confirmation__icon {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
  font-size: 29px;
}

.plan-confirmation__selected-copy {
  min-width: 0;
  flex: 1;
}

.plan-confirmation__label {
  display: block;
  margin-bottom: 2px;
  color: #6d7b92;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.plan-confirmation__selected-copy > strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0b1c46;
  font-size: 17px;
}

.plan-confirmation__price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 5px;
}

.plan-confirmation__price-row span {
  color: #0c2f85;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-confirmation__price-row small {
  color: #697890;
  font-size: 12px;
}

.plan-confirmation__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.plan-confirmation__details > div {
  padding: 12px 14px;
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: #ffffff;
}

.plan-confirmation__details span,
.plan-confirmation__details strong {
  display: block;
}

.plan-confirmation__details span {
  margin-bottom: 3px;
  color: #7a879b;
  font-size: 11.5px;
}

.plan-confirmation__details strong {
  color: #243d67;
  font-size: 13.5px;
}

.plan-confirmation__features {
  margin-top: 18px;
}

.plan-confirmation__features h3 {
  margin: 0 0 10px;
  color: #21375d;
  font-size: 14px;
  font-weight: 700;
}

.plan-confirmation__features > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

.plan-confirmation__features .plan-feature {
  font-size: 12.5px;
}

.plan-confirmation__notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid #d9e5ff;
  border-radius: 11px;
  background: #f2f6ff;
  color: #456087;
  font-size: 12px;
  line-height: 1.45;
}

.plan-confirmation__notice i {
  margin-top: 1px;
  flex: 0 0 auto;
  color: #2462e6;
  font-size: 17px;
}

.plan-confirmation__footer {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 18px 26px 24px;
  border-top: 1px solid #e4eaf3;
  background: #fbfcfe;
}

.plan-confirmation__cancel,
.plan-confirmation__proceed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
}

.plan-confirmation__cancel {
  border: 1px solid #ccd6e4;
  background: #ffffff;
  color: #4c5f7d;
}

.plan-confirmation__proceed {
  gap: 8px;
  border: 1px solid #0a38c8;
  background: linear-gradient(180deg, #174bd5 0%, #082ead 100%);
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(12, 52, 182, 0.18);
}

.plan-confirmation__proceed--free {
  border-color: #078c67;
  background: linear-gradient(180deg, #14a77e 0%, #07805f 100%);
  box-shadow: 0 6px 15px rgba(7, 128, 95, 0.16);
}

.plan-confirmation__cancel:hover:not(:disabled) {
  background: #f3f6fa;
}

.plan-confirmation__proceed:hover:not(:disabled) {
  filter: brightness(1.06);
}

.plan-confirmation button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.plan-confirmation__proceed.is-loading {
  box-shadow: none;
}

.plan-skeleton__card {
  min-height: 330px;
  padding: 26px;
}

.plan-skeleton__head {
  display: flex;
  gap: 18px;
}

.plan-skeleton__icon,
.plan-skeleton__line,
.plan-skeleton__button {
  border-radius: 9px;
  background: linear-gradient(90deg, #edf1f6 15%, #f8faff 45%, #edf1f6 75%);
  background-size: 220% 100%;
  animation: plan-shimmer 1.35s linear infinite;
}

.plan-skeleton__icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.plan-skeleton__copy {
  width: 68%;
  padding-top: 3px;
}

.plan-skeleton__line {
  height: 12px;
  margin-bottom: 12px;
}

.plan-skeleton__line--title {
  width: 62%;
  height: 15px;
}

.plan-skeleton__line--price {
  width: 88%;
  height: 23px;
}

.plan-skeleton__divider {
  height: 1px;
  margin: 22px 0 18px;
  background: #e2e7ee;
}

.plan-skeleton__features .plan-skeleton__line:nth-child(1) { width: 72%; }
.plan-skeleton__features .plan-skeleton__line:nth-child(2) { width: 64%; }
.plan-skeleton__features .plan-skeleton__line:nth-child(3) { width: 80%; }
.plan-skeleton__features .plan-skeleton__line:nth-child(4) { width: 70%; }

.plan-skeleton__button {
  height: 42px;
  margin-top: 25px;
}

.subscription-page ~ .footer {
  display: flex;
  min-height: 80px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

@media (min-width: 1200px) {
  .subscription-plan-card.is-current {
    min-height: 377px;
  }

  .subscription-plan-card:nth-child(n + 4) {
    padding: 19px 21px;
  }

  .subscription-plan-card:nth-child(n + 4).is-current {
    padding: 18px 20px;
  }

  .subscription-plan-card:nth-child(n + 4) .plan-card__head {
    min-height: 58px;
  }

  .subscription-plan-card:nth-child(n + 4) .plan-card__divider {
    margin: 9px 0 8px;
  }

  .subscription-plan-card:nth-child(n + 4) .plan-card__features {
    gap: 7px;
    margin-bottom: 15px;
  }
}

@keyframes plan-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -20% 0; }
}

@media (max-width: 1199.98px) {
  .subscription-page .content {
    padding-inline: 24px;
  }

  .plans-grid,
  .plan-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .subscription-page .content {
    padding: 18px 16px 24px;
  }

  .subscription-hero {
    gap: 13px;
    margin-bottom: 18px;
  }

  .subscription-hero__icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 21px;
  }

  .subscription-hero h1 {
    font-size: 22px;
  }

  .subscription-hero p {
    font-size: 13px;
  }

  .plans-grid,
  .plan-skeleton {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .subscription-plan-card,
  .plan-skeleton__card {
    padding: 21px;
    border-radius: 17px;
  }

  .subscription-plan-card.is-current {
    padding: 20px;
  }

  .plan-card__head {
    gap: 13px;
  }

  .plan-card__icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    font-size: 26px;
  }

  .plan-card__price {
    font-size: 24px;
  }

  .plan-confirmation-modal .modal-dialog {
    margin: 12px;
  }

  .plan-confirmation {
    border-radius: 18px;
  }

  .plan-confirmation__header,
  .plan-confirmation__body {
    padding-inline: 19px;
  }

  .plan-confirmation__footer {
    padding: 16px 19px 19px;
  }

  .plan-confirmation__features > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 389.98px) {
  .plan-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .subscription-plan-card {
    position: relative;
  }

  .plan-card__summary {
    padding-right: 4px;
  }

  .plan-confirmation__details,
  .plan-confirmation__footer {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .subscription-plan-card,
  .plan-action {
    transition: none;
  }

  .plan-skeleton__icon,
  .plan-skeleton__line,
  .plan-skeleton__button {
    animation: none;
  }
}

/* Notices, change policy and a highlighted package (31 Oct 2026) */
.plans-notice,
.plans-policy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
}

.plans-notice {
  background: #fff7e8;
  border: 1px solid #f3dcae;
  color: #7a5414;
}

.plans-policy {
  background: #f3f6fd;
  border: 1px solid #e0e7f6;
  color: #3a4664;
}

.plans-notice i,
.plans-policy i {
  font-size: 18px;
  margin-top: 1px;
}

.plans-policy strong {
  color: #0f1f4b;
}

.subscription-plan-card.is-highlighted {
  border-color: #c9a45c;
  box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.28), 0 14px 30px rgba(15, 31, 75, 0.12);
}

.plan-action__hint + .plan-action__hint {
  margin-top: 4px;
}

/* Payment method picker in the plan summary (saved Amber Pay cards) */
.plan-payment {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf0f6;
}

.plan-payment__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.plan-payment__head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f1f4b;
}

.plan-payment__secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1e7a46;
}

.pay-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e3e8f2;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pay-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-option label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  cursor: pointer;
  min-width: 0;
}

.pay-option:has(input:checked) {
  border-color: #1d3fbf;
  background: #f6f8ff;
  box-shadow: 0 0 0 3px rgba(29, 63, 191, 0.12);
}

.pay-option:has(input:focus-visible) {
  outline: 2px solid #1d3fbf;
  outline-offset: 2px;
}

.pay-option.is-expired {
  opacity: 0.6;
}

.pay-option.is-expired label {
  cursor: not-allowed;
}

.pay-option__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pay-option__text strong {
  font-size: 14px;
  color: #0f1f4b;
  letter-spacing: 0.02em;
}

.pay-option__text small {
  font-size: 12px;
  color: #6b7794;
}

.pay-option__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.pay-link {
  border: 0;
  background: transparent;
  color: #1d3fbf;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
}

.pay-link:hover {
  background: #eef2ff;
}

.pay-link--danger {
  color: #b42318;
}

.pay-link--danger:hover {
  background: #fdecec;
}

.pay-brand {
  flex: 0 0 52px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid #e3e8f2;
  background: #fff;
  position: relative;
}

.pay-brand--visa {
  color: #1a1f71;
  font-style: italic;
  font-size: 13px;
}

.pay-brand--amex {
  background: #2e77bc;
  border-color: #2e77bc;
  color: #fff;
}

.pay-brand--discover {
  color: #e66a00;
  font-size: 9px;
}

.pay-brand--keycard {
  background: #0f1f4b;
  border-color: #0f1f4b;
  color: #fff;
  font-size: 9px;
}

.pay-brand--generic {
  color: #4b587a;
  font-size: 18px;
  background: #f3f5fa;
}

.pay-brand--mastercard i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
}

.pay-brand--mastercard i:first-child {
  background: #eb001b;
  margin-right: -6px;
}

.pay-brand--mastercard i:last-child {
  background: #f79e1b;
  mix-blend-mode: multiply;
}

.pay-save {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f9fc;
  cursor: pointer;
}

.pay-save input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #1d3fbf;
}

.pay-save span {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #33415f;
}

.pay-save strong {
  color: #0f1f4b;
  font-size: 13px;
}

.pay-save small {
  color: #6b7794;
  font-size: 12px;
}

.pay-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 10px 0 0;
  font-size: 11.5px;
  color: #7b879a;
  line-height: 1.45;
}

@media (max-width: 575.98px) {
  .pay-option {
    flex-wrap: wrap;
  }

  .pay-option__actions {
    width: 100%;
    justify-content: flex-end;
  }
}
