/* Standalone public renewal page. */
.renew-surface { color: var(--color-text-primary); }
.renew-page { display: grid; gap: 1.25rem; width: min(100%, 21.875rem); max-width: calc(100vw - 2rem); margin: 0 auto; }
.renew-intro { padding: 2rem; text-align: center; }
.renew-intro h1 { font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -0.035em; }
.renew-intro h1 span { display: block; margin-top: 8px; color: var(--color-text-muted); font-family: var(--font-body-stack); font-size: 17px; font-weight: 400; letter-spacing: 0; line-height: 1.5; }
.renew-intro h1 .renew-key-status { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--color-success); }
.renew-key-status::before { content: ""; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.renew-intro h1 .renew-key-status[data-tone="warning"] { color: var(--color-warning); }
.renew-intro h1 .renew-key-status[data-tone="danger"] { color: var(--color-danger); }

.renew-card { min-width: 0; overflow: hidden; }
.renew-section { display: grid; gap: 16px; padding: 2rem; min-width: 0; }
.renew-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 0; }
.renew-section-heading h2 { color: var(--color-text-primary); font-size: 18px; font-weight: 700; line-height: 1.25; }
.renew-key-section:not(:has(.renew-key-details)) { gap: 0; }
.renew-key-section:not(:has(.renew-key-details)) > .renew-description { margin-top: 8px; }
.renew-search-form { display: grid; gap: 12px; margin-top: 16px; }
.renew-back-link { display: inline-flex; align-items: center; justify-content: center; justify-self: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-control-secondary); color: var(--color-text-secondary); transition: background-color 160ms ease, color 160ms ease; }
.renew-back-link:hover { background-color: color-mix(in srgb, var(--ui-surface) 90%, var(--color-text-secondary) 10%); color: var(--color-text-primary); }
.renew-key-section > .renew-notice { margin-top: 16px; }
.renew-key-heading { min-width: 0; }
.renew-found-message { margin-top: -8px; overflow-wrap: anywhere; }
.renew-found-message strong { color: var(--color-text-primary); font-weight: 600; }
.renew-expiry-message { display: block; font-weight: 600; }
.renew-expiry-message[data-tone="good"] { color: var(--color-success); }
.renew-expiry-message[data-tone="warning"] { color: var(--color-warning); }
.renew-expiry-message[data-tone="danger"] { color: var(--color-danger); }
.renew-key-meta { display: grid; gap: 8px; min-width: 0; }

.renew-description { color: var(--color-text-muted); font-size: 14px; line-height: 24px; }
.renew-search-row { position: relative; min-width: 0; }
.renew-surface .renew-input { padding-right: 4rem; }
.renew-surface .renew-search-arrow:disabled,
.renew-surface .renew-search-arrow:disabled:hover { cursor: not-allowed; background-color: var(--color-control-secondary) !important; color: var(--color-text-subtle) !important; }
.renew-surface .renew-input::placeholder { color: var(--ui-text-subtle); }
.renew-surface .renew-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--color-danger) !important; }
.renew-surface :is(button, a):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.renew-text-button { display: inline; margin: 0; padding: 0; color: var(--color-text-secondary); font: inherit; text-align: inherit; text-decoration: underline; text-underline-offset: 4px; }
.renew-text-button:hover { color: var(--color-text-primary); }

.renew-period-section { padding-top: 0; }
.renew-card > .renew-key-section:has(.renew-key-details),
.renew-card > .renew-period-section { padding-bottom: 16px; }
/* Match the profile's renewal workspace minus its heading and section gap. */
.renew-surface .renew-periods {
  --key-device-selection-border: var(--color-border-white-selected);
  --key-device-selection-surface: var(--color-tint-active);
  height: calc(13.44rem - 3.075rem - 1rem);
}

.renew-payment-section { gap: 12px; padding-top: 0; }
.renew-payment-form { display: grid; gap: 16px; }
.renew-checkout { display: grid; gap: 16px; }
.renew-total { display: grid; gap: 12px; min-width: 0; }
.renew-order-summary { display: grid; gap: 8px; min-width: 0; }
.renew-summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--buy-border); font-size: 12px; line-height: 18px; }
.renew-summary-row[hidden] { display: none; }
.renew-summary-row:last-child { padding-bottom: 0; border-bottom: 0; }
.renew-summary-row dt { min-width: 0; color: var(--color-text-muted); }
.renew-summary-row dd { min-width: 0; color: var(--color-text-primary); font-weight: 600; text-align: right; }
.renew-surface .renew-button--pay,
.renew-surface .renew-button--search { width: 100%; padding-block: 0.5rem; }
.renew-surface .renew-button--search[hidden] { display: none; }
.renew-surface .renew-button--search:disabled,
.renew-surface .renew-button--search:disabled:hover { cursor: not-allowed; border: 0; background: var(--color-control-secondary); color: var(--color-text-subtle); box-shadow: none; opacity: 1; }
.renew-payment-note { max-width: 540px; margin: 0 auto; color: var(--color-text-muted); font-size: 12px; line-height: 1.75; text-align: center; text-wrap: pretty; }
.renew-notice { margin: 0; padding: 16px 20px; border: 1px solid var(--color-border-strong); border-radius: 14px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.renew-notice--error { color: var(--color-danger-text); background: var(--color-danger-surface); border-color: var(--color-danger-border-soft); }
.renew-notice--success { color: var(--color-success-text); background: var(--color-success-surface); border-color: var(--color-success-border-soft); }

@media (max-width: 600px) {
  .renew-section-heading { gap: 12px; flex-wrap: wrap; }
  .renew-payment-section { padding-top: 0; }
  .renew-total { gap: 12px; }
}

@media (max-width: 1023px) {
  .renew-section-heading h2 { font-size: 1.25rem; line-height: 1.4; }
  .renew-key-section > .renew-description { font-size: 1rem; line-height: 1.5; }
  .renew-summary-row { font-size: 0.875rem; line-height: 1.5; }
  .renew-payment-note { font-size: 0.875rem; line-height: 1.5; }
  .renew-surface .key-renew-option__name { font-size: 0.875rem; line-height: 1.25rem; }
  .renew-surface .key-renew-option__price { font-size: 1.5rem; line-height: 1.75rem; }
  .renew-surface .renew-button--pay,
  .renew-surface .renew-button--search,
  .renew-surface .renew-reset-form button { font-size: 1rem; line-height: 1.5; }
  .renew-search-form { margin-top: 12px; }
}

@media (max-width: 639px) {
  .renew-intro { padding: 1.25rem; }
  .renew-section { padding: 1.25rem; }
  .renew-period-section, .renew-payment-section { padding-top: 0; }
}

@media (min-width: 1024px) {
  .renew-search-form { margin-top: 1.5rem; }
}
