/*
 * Page styles: services. Owned by the page agent for this area; loaded after
 * hostsrc.css and hostsrc-cart.css. Scope every rule to the body class
 * .hs-page-<templatefile> (see header.tpl). Order form pages load Standard
 * Cart's all.min.css after this file, so prefix those rules with "html body".
 *
 * Pages: clientareaproducts (My Services), clientareaproductdetails (one
 * service), clientareacancelrequest, upgrade and upgradesummary. The shared
 * pieces (.hs-svc-*) are tiles on the Ash Panel: 14px corners, 8px gaps, no
 * border, no shadow, fine Ghost Line dividers inside. Geist Mono for figures.
 *
 * 1. Shared tile pieces
 * 2. Service details
 * 3. My Services list
 * 4. Cancellation
 * 5. Upgrade and downgrade
 */

/* 1. Shared tile pieces -------------------------------------------------- */

.hs-body:is(.hs-page-clientareaproductdetails, .hs-page-clientareacancelrequest, .hs-page-upgrade, .hs-page-upgradesummary, .hs-page-clientareaproducts) {
  --hs-svc-pad: 20px;
}
@media (min-width: 768px) {
  .hs-body:is(.hs-page-clientareaproductdetails, .hs-page-clientareacancelrequest, .hs-page-upgrade, .hs-page-upgradesummary, .hs-page-clientareaproducts) {
    --hs-svc-pad: 24px;
  }
}

.hs-body .hs-svc-hero,
.hs-body .hs-svc-tile,
.hs-body .hs-list-empty {
  margin: 0 0 8px;
  padding: var(--hs-svc-pad);
  background-color: var(--hs-card);
  border-radius: var(--hs-radius-xl);
  color: var(--hs-foreground);
}

.hs-body .hs-svc-eyebrow {
  margin: 0 0 4px;
  color: var(--hs-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}
/* Size and weight come from hostsrc.css's h1 scale, as on every page. */
.hs-body h1.hs-svc-title,
.hs-body h1.hs-list-title {
  margin: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hs-body h1.hs-list-title { margin-bottom: 16px; }

.hs-body .hs-svc-tile-title {
  margin: 0 0 16px;
  color: var(--hs-foreground);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
}
.hs-body .hs-svc-label {
  display: block;
  margin: 0;
  color: var(--hs-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
}
.hs-body .hs-svc-hint {
  margin: 6px 0 0;
  color: var(--hs-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Definition rows: label left, value right, a fine line between rows. */
.hs-body .hs-svc-dl { margin: 0; }
.hs-body .hs-svc-dl > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--hs-border);
}
.hs-body .hs-svc-dl > div:first-child { border-top: 0; padding-top: 0; }
.hs-body .hs-svc-dl > div:last-child { padding-bottom: 0; }
.hs-body .hs-svc-dl dt {
  color: var(--hs-muted);
  font-size: 0.875rem;
  font-weight: 400;
}
.hs-body .hs-svc-dl dd {
  margin: 0;
  color: var(--hs-foreground);
  font-size: 0.9375rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.hs-body .hs-svc-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
}
.hs-body .hs-svc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Phones: every control in these pages is at least 44px tall. */
@media (max-width: 767.98px) {
  .hs-body:is(.hs-page-clientareaproductdetails, .hs-page-clientareacancelrequest, .hs-page-upgrade, .hs-page-upgradesummary, .hs-page-clientareaproducts) .primary-content .btn,
  .hs-body:is(.hs-page-clientareaproductdetails, .hs-page-clientareacancelrequest, .hs-page-upgrade, .hs-page-upgradesummary) .primary-content .form-control {
    min-height: 44px;
  }
}

/* 2. Service details ----------------------------------------------------- */

.hs-page-clientareaproductdetails .hs-svc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.hs-page-clientareaproductdetails .hs-svc-name { min-width: 0; }
.hs-page-clientareaproductdetails .hs-svc-status {
  flex-shrink: 0;
  margin-top: 4px;
}

.hs-page-clientareaproductdetails .hs-svc-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.hs-page-clientareaproductdetails .hs-svc-facts li {
  padding: 3px 10px;
  border-radius: var(--hs-radius-sm);
  background: var(--hs-control);
  color: var(--hs-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.hs-page-clientareaproductdetails .hs-svc-address {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hs-border);
}
.hs-page-clientareaproductdetails .hs-svc-address-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 4px;
}
.hs-page-clientareaproductdetails code.hs-svc-ip {
  padding: 0;
  background: transparent;
  color: var(--hs-foreground);
  font-family: var(--hs-font-mono);
  font-size: 1.375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  user-select: all;
}
@media (min-width: 768px) {
  .hs-page-clientareaproductdetails code.hs-svc-ip { font-size: 1.625rem; }
}
.hs-page-clientareaproductdetails .hs-copy {
  min-width: 96px;
  min-height: 36px;
}
.hs-page-clientareaproductdetails .hs-copy.is-copied i { color: var(--hs-live); }

.hs-page-clientareaproductdetails .hs-svc-cta { margin-top: 20px; }
.hs-page-clientareaproductdetails .hs-svc-panel { min-height: 44px; }
@media (max-width: 575.98px) {
  .hs-page-clientareaproductdetails .hs-svc-panel { width: 100%; }
}

/* An alert with its button on the right (unpaid invoice). */
.hs-page-clientareaproductdetails .hs-svc-alert-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.hs-page-clientareaproductdetails .hs-svc-alert-text { flex: 1 1 240px; }

.hs-page-clientareaproductdetails .hs-svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.hs-page-clientareaproductdetails .hs-svc-grid > .hs-svc-tile { margin: 0; }

.hs-page-clientareaproductdetails .hs-svc-billing {
  display: flex;
  flex-direction: column;
}
.hs-page-clientareaproductdetails .hs-svc-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hs-border);
}
.hs-page-clientareaproductdetails .hs-svc-figure { min-width: 0; }
.hs-page-clientareaproductdetails .hs-svc-figure-value {
  display: block;
  margin-top: 2px;
  color: var(--hs-foreground);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.hs-page-clientareaproductdetails .hs-svc-figure-note {
  display: block;
  color: var(--hs-muted);
  font-size: 0.875rem;
}
.hs-page-clientareaproductdetails .hs-svc-billing .hs-svc-dl { margin-bottom: 16px; }
.hs-page-clientareaproductdetails .hs-svc-billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hs-border);
}
/* A plain secondary button; it turns to the danger colours only on hover and focus. */
.hs-page-clientareaproductdetails .hs-svc-cancel:hover,
.hs-page-clientareaproductdetails .hs-svc-cancel:focus-visible {
  color: var(--hs-danger) !important;
  border-color: oklch(0.704 0.191 22.216 / 45%) !important;
}
/* Once requested: the status chip, aligned with the buttons' row. */
.hs-page-clientareaproductdetails .hs-svc-cancel-state {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.hs-page-clientareaproductdetails .hs-svc-hook { margin-bottom: 8px; }
.hs-page-clientareaproductdetails .hs-svc-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}
.hs-page-clientareaproductdetails #ssl-info { margin-top: 16px; }
.hs-page-clientareaproductdetails #ssl-info .alert { margin: 0; }

/* The server module's own output, printed as it comes and restyled: its
   label/value table, the panel button (outlined here, as the hero carries
   the bright one) and the allocations table. */
.hs-page-clientareaproductdetails .hs-svc-module .module-client-area { padding: 0; text-align: left; }
/* The module writes Bootstrap 3 columns (col-xs-*), which Bootstrap 4 does not
   size: full width for the tables, the button keeps its own width. */
.hs-page-clientareaproductdetails .hs-svc-module .row > .col-xs-12 { flex: 0 0 100%; max-width: 100%; }
.hs-page-clientareaproductdetails .hs-svc-module .row { margin-left: 0; margin-right: 0; }
.hs-page-clientareaproductdetails .hs-svc-module .row > [class*="col"] { padding-left: 0; padding-right: 0; }
.hs-page-clientareaproductdetails .hs-svc-module .row + .row { margin-top: 16px !important; }
.hs-page-clientareaproductdetails .hs-svc-module .table { margin-bottom: 0; font-size: 0.9375rem; }
.hs-page-clientareaproductdetails .hs-svc-module .table:not(.table-bordered) td {
  padding: 10px 0;
  border-top: 1px solid var(--hs-border) !important;
  text-align: left !important;
}
.hs-page-clientareaproductdetails .hs-svc-module .table:not(.table-bordered) tr:first-child td { border-top: 0 !important; padding-top: 0; }
.hs-page-clientareaproductdetails .hs-svc-module .table:not(.table-bordered) td:first-child {
  width: 40%;
  padding-right: 16px;
  color: var(--hs-muted);
  font-weight: 400 !important;
  font-size: 0.875rem;
}
.hs-page-clientareaproductdetails .hs-svc-module .table:not(.table-bordered) tr:last-child td { padding-bottom: 0; }
.hs-page-clientareaproductdetails .hs-svc-module .table-bordered,
.hs-page-clientareaproductdetails .hs-svc-module .table-bordered th,
.hs-page-clientareaproductdetails .hs-svc-module .table-bordered td { border-left: 0 !important; border-right: 0 !important; }
.hs-page-clientareaproductdetails .hs-svc-module .table-bordered td { font-family: var(--hs-font-mono); font-variant-numeric: tabular-nums; }
.hs-page-clientareaproductdetails .hs-svc-module h4 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
/* (Not on an xHLDS licence: no panel button there, so its download is the bright one.) */
.hs-page-clientareaproductdetails .hs-svc-module .btn-success,
.hs-page-clientareaproductdetails .hs-svc-module:not(.hs-svc-xhlds) .btn-primary {
  background: var(--hs-fill) !important;
  border: 1px solid var(--hs-input) !important;
  color: var(--hs-foreground) !important;
}
.hs-page-clientareaproductdetails .hs-svc-module .btn-success:hover,
.hs-page-clientareaproductdetails .hs-svc-module:not(.hs-svc-xhlds) .btn-primary:hover {
  background: var(--hs-fill-hover) !important;
  border-color: oklch(1 0 0 / 22%) !important;
}
.hs-page-clientareaproductdetails .hs-svc-module .btn-block {
  display: inline-flex;
  width: auto;
  min-height: 40px;
}
.hs-page-clientareaproductdetails .hs-svc-module .label-primary,
.hs-page-clientareaproductdetails .hs-svc-module .label-default {
  background: var(--hs-control);
  color: var(--hs-foreground);
}
.hs-page-clientareaproductdetails .hs-svc-module .alert { margin: 16px 0 0; }

/* xHLDS licence (server module hostsrc_xhlds, packages/xhlds-licence/whmcs, templates/overview.tpl).
   The theme titles the tile "Licence" (.hs-svc-xhlds); the module's licence pill sits on the
   title's line, its download is one light block, the address form a disclosure. */
.hs-page-clientareaproductdetails .hs-svc-xhlds { position: relative; }
.hs-page-clientareaproductdetails .hs-svc-xhlds .hostsrc-xhlds .hs-xhlds-pill {
  position: absolute;
  top: var(--hs-svc-pad);
  right: var(--hs-svc-pad);
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-flash { margin: 0 0 16px; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-links { margin: 8px 0 0; padding-left: 18px; }
/* One figure per row on phones: an ip:port must not break. */
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-svc-figures { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 2px;
}
.hs-page-clientareaproductdetails .hostsrc-xhlds code.hs-xhlds-server {
  margin: 0;
  padding: 0;
  background: transparent;
  overflow-wrap: anywhere;
  user-select: all;
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-svc-dl code {
  padding: 0;
  background: transparent;
  font-size: 0.9375rem;
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 20px 0 0;
  padding: 16px 20px;
  border-radius: var(--hs-radius-lg);
  background: var(--hs-control);
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block-text { flex: 1 1 280px; min-width: 0; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block-title {
  margin: 0;
  color: var(--hs-foreground);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block-text .hs-svc-hint { margin-top: 4px; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block-action { flex: 0 0 auto; margin: 0; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block-action .btn { min-height: 44px; }
@media (max-width: 575.98px) {
  .hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block-action { flex-basis: 100%; }
  .hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-block-action .btn { width: 100%; }
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-consent { margin: 12px 0 0; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-consent .form-check-label {
  color: var(--hs-foreground);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-state-text { margin-top: 16px; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 16px;
  margin-top: 12px;
}
@media (max-width: 575.98px) {
  .hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-foot { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--hs-foreground);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address summary::-webkit-details-marker { display: none; }
/* A chevron that turns down when open. */
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -2px;
  border-right: 1.5px solid var(--hs-muted);
  border-bottom: 1.5px solid var(--hs-muted);
  transform: rotate(-45deg);
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address[open] summary::after { transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  .hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address summary::after { transition: transform 0.15s ease; }
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address-body { max-width: 440px; padding: 4px 0 8px; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address fieldset { margin: 0; padding: 0; border: 0; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 0 12px;
  margin-top: 12px;
}
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-address .btn { margin-top: 12px; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-licence-only { margin: 0; }
.hs-page-clientareaproductdetails .hostsrc-xhlds .hs-xhlds-licence-only .btn-link {
  min-height: 44px;
  padding: 0;
  color: var(--hs-foreground);
}

/* Resource usage dials. */
.hs-page-clientareaproductdetails .hs-svc-usage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.hs-page-clientareaproductdetails .hs-svc-usage .hs-svc-label { margin-bottom: 8px; }
.hs-page-clientareaproductdetails .hs-svc-usage p { margin: 8px 0 0; }
.hs-page-clientareaproductdetails .hs-svc-metrics td,
.hs-page-clientareaproductdetails .hs-svc-metrics th { white-space: nowrap; }

/* Downloads and add-ons (sidebar tabs). */
.hs-page-clientareaproductdetails .hs-svc-list { margin: 0; padding: 0; list-style: none; }
.hs-page-clientareaproductdetails .hs-svc-list > li { padding: 16px 0; border-top: 1px solid var(--hs-border); }
.hs-page-clientareaproductdetails .hs-svc-list > li:first-child { border-top: 0; padding-top: 0; }
.hs-page-clientareaproductdetails .hs-svc-list > li:last-child { padding-bottom: 0; }
.hs-page-clientareaproductdetails .hs-svc-list-title { margin: 0 0 6px; font-size: 1rem; font-weight: 600; }
.hs-page-clientareaproductdetails .hs-svc-list p { color: var(--hs-muted); }
.hs-page-clientareaproductdetails .hs-svc-addon-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.hs-page-clientareaproductdetails .hs-svc-addon-actions { margin-top: 12px; }
.hs-page-clientareaproductdetails .hs-svc-tile > .alert { margin-bottom: 16px; }

/* Change password. */
.hs-page-clientareaproductdetails .hs-svc-pw { max-width: 560px; }
.hs-page-clientareaproductdetails .hs-svc-pw-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}
.hs-page-clientareaproductdetails .hs-svc-pw-field { flex: 1 1 240px; min-width: 0; }
.hs-page-clientareaproductdetails .hs-svc-pw .generate-password { min-height: 40px; }

/* 3. My Services list ---------------------------------------------------- */

.hs-page-clientareaproducts .hs-list-empty { max-width: 560px; }
.hs-page-clientareaproducts .hs-list-empty-title { margin: 0 0 8px; font-size: 1.125rem; font-weight: 600; }
.hs-page-clientareaproducts .hs-list-empty p { margin: 0 0 20px; color: var(--hs-muted); }

.hs-page-clientareaproducts #tableServicesList td.hs-cell-name,
.hs-page-clientareaproducts #tableServicesList thead th:nth-child(2) { text-align: left; }
.hs-page-clientareaproducts #tableServicesList .hs-service-link {
  color: var(--hs-foreground);
  font-weight: 600;
  text-decoration: none;
}
.hs-page-clientareaproducts #tableServicesList .hs-service-link:hover { text-decoration: underline; }
.hs-page-clientareaproducts #tableServicesList tbody tr { cursor: pointer; }
.hs-page-clientareaproducts #tableServicesList .hs-service-ip {
  display: block;
  margin-top: 2px;
  color: var(--hs-muted);
  font-size: 0.8125rem;
}
.hs-page-clientareaproducts #tableServicesList td.hs-cell-due,
.hs-page-clientareaproducts #tableServicesList td.hs-cell-price { white-space: nowrap; }

/* Phones: each service is a tile. Name and status on the first line, price
   and next due date (each with its column name) on the second. Sorting stays
   on wider screens; the default order (live first, soonest due) holds here. */
@media (max-width: 767.98px) {
  .hs-page-clientareaproducts .dataTables_wrapper table#tableServicesList.table-list {
    display: block;
    overflow: visible;
    white-space: normal;
  }
  .hs-page-clientareaproducts #tableServicesList thead { display: none; }
  .hs-page-clientareaproducts #tableServicesList tbody { display: block; }
  .hs-page-clientareaproducts #tableServicesList tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    margin-bottom: 8px;
    padding: 16px;
    background: var(--hs-card);
    border-radius: var(--hs-radius-xl);
  }
  .hs-page-clientareaproducts #tableServicesList tbody tr:hover { background: var(--hs-control); }
  .hs-page-clientareaproducts #tableServicesList.table-list > tbody > tr > td,
  .hs-page-clientareaproducts #tableServicesList.table-list > tbody > tr:hover > td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    white-space: normal;
  }
  .hs-page-clientareaproducts #tableServicesList tbody td.ssl-info { grid-column: 1 / -1; }
  .hs-page-clientareaproducts #tableServicesList tbody td:first-child:empty { display: none; }
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-name { grid-column: 1; }
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-status { grid-column: 2; justify-self: end; }
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-price { grid-column: 1; }
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-due { grid-column: 2; text-align: right !important; }
  /* Put status beside the name: name first, status second in the grid. */
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-name { order: 1; }
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-status { order: 2; }
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-price { order: 3; }
  .hs-page-clientareaproducts #tableServicesList td.hs-cell-due { order: 4; }
  .hs-page-clientareaproducts #tableServicesList td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--hs-muted);
    font-family: var(--hs-font-sans);
    font-size: 0.75rem;
    font-weight: 500;
  }
  .hs-page-clientareaproducts #tableServicesList td.dataTables_empty { grid-column: 1 / -1; text-align: center !important; }
  .hs-page-clientareaproducts .dataTables_wrapper .dataTables_filter {
    float: none;
    width: 100%;
    margin: 0 0 8px;
    text-align: left;
  }
  .hs-page-clientareaproducts .dataTables_wrapper .dataTables_filter label { display: block; width: 100%; margin: 0; }
  .hs-page-clientareaproducts .dataTables_wrapper .dataTables_filter input { width: 100% !important; margin-left: 0 !important; }
  .hs-page-clientareaproducts .dataTables_wrapper .dataTables_info {
    float: none;
    height: auto;
    min-height: 0;
    padding: 0 0 4px;
    text-align: left;
    white-space: normal;
  }
}

/* 4. Cancellation -------------------------------------------------------- */

.hs-page-clientareacancelrequest .hs-cancel { max-width: 640px; }
.hs-page-clientareacancelrequest .hs-cancel-domain { margin: 4px 0 0; color: var(--hs-muted); }
.hs-page-clientareacancelrequest .hs-cancel-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hs-border);
}
.hs-page-clientareacancelrequest .hs-cancel-form fieldset { margin: 0; padding: 0; border: 0; }
.hs-page-clientareacancelrequest .hs-cancel-form textarea { min-height: 120px; }
.hs-page-clientareacancelrequest .hs-cancel-type { max-width: 320px; }
.hs-page-clientareacancelrequest .hs-cancel-form .form-group > label { display: block; }
.hs-page-clientareacancelrequest .hs-cancel-form .alert .form-check { padding-left: 0; font-weight: 400; }
.hs-page-clientareacancelrequest .primary-content > .alert { max-width: 640px; }

/* 5. Upgrade and downgrade ----------------------------------------------- */

.hs-body:is(.hs-page-upgrade, .hs-page-upgradesummary) .hs-upgrade-current-name {
  margin: 4px 0 0;
  font-size: 1.0625rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.hs-body:is(.hs-page-upgrade, .hs-page-upgradesummary) .hs-upgrade-current .hs-svc-hint { margin-top: 2px; }
.hs-page-upgrade .hs-upgrade-intro { margin: 16px 0; color: var(--hs-muted); }
.hs-page-upgrade .hs-upgrade-heading { margin: 0 0 8px; }

.hs-page-upgrade .hs-upgrade-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 8px;
}
.hs-page-upgrade .hs-upgrade-plan {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.hs-page-upgrade .hs-upgrade-plan-name { margin: 0; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.hs-page-upgrade .hs-upgrade-plan-desc {
  margin-top: 12px;
  color: var(--hs-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}
.hs-page-upgrade .hs-upgrade-plan-desc ul { margin: 0; padding-left: 18px; }
.hs-page-upgrade .hs-upgrade-plan-desc p { margin: 0 0 8px; }
.hs-page-upgrade .hs-upgrade-plan-form {
  margin-top: auto;
  padding-top: 16px;
}
.hs-page-upgrade .hs-upgrade-plan-form .form-group { margin-bottom: 8px; }
.hs-page-upgrade .hs-upgrade-price { margin: 0; font-size: 1.125rem; font-weight: 600; }

.hs-page-upgrade .hs-upgrade-options-head,
.hs-page-upgrade .hs-upgrade-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.hs-page-upgrade .hs-upgrade-options-head { display: none; }
.hs-page-upgrade .hs-upgrade-option { padding: 14px 0; border-top: 1px solid var(--hs-border); }
.hs-page-upgrade .hs-upgrade-option:nth-child(2) { border-top: 0; padding-top: 0; }
.hs-page-upgrade .hs-upgrade-option:last-child { padding-bottom: 0; }
.hs-page-upgrade .hs-upgrade-option-name { font-weight: 600; }
.hs-page-upgrade .hs-upgrade-option-current { color: var(--hs-muted); font-size: 0.9375rem; }
.hs-page-upgrade .hs-upgrade-option-tag { font-size: 0.8125rem; }
.hs-page-upgrade .hs-upgrade-option-tag::after { content: ":"; }
.hs-page-upgrade .hs-upgrade-option-new { margin: 0; }
.hs-page-upgrade .hs-upgrade-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 400; }
/* Options the server keeps (server/hostsrc_upgrade_options.php): text where a select would be. */
.hs-page-upgrade .hs-upgrade-option-fixed { color: var(--hs-muted); font-size: 0.9375rem; }
.hs-page-upgrade .hs-upgrade-note { margin: 12px 0 0; }
@media (min-width: 768px) {
  .hs-page-upgrade .hs-upgrade-options-head,
  .hs-page-upgrade .hs-upgrade-option {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 16px;
  }
  .hs-page-upgrade .hs-upgrade-options-head {
    display: grid;
    padding-bottom: 10px;
    color: var(--hs-muted);
    font-size: 0.8125rem;
    font-weight: 600;
  }
  .hs-page-upgrade .hs-upgrade-option:nth-child(2) { border-top: 1px solid var(--hs-border); padding-top: 14px; }
  .hs-page-upgrade .hs-upgrade-option-tag {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.hs-page-upgradesummary .hs-upgrade-table { margin: 0; }
.hs-page-upgradesummary .hs-upgrade-table th:first-child,
.hs-page-upgradesummary .hs-upgrade-table td:first-child { padding-left: 0; }
.hs-page-upgradesummary .hs-upgrade-table th:last-child,
.hs-page-upgradesummary .hs-upgrade-table td:last-child { padding-right: 0; white-space: nowrap; }
.hs-page-upgradesummary .hs-upgrade-table tfoot th {
  color: var(--hs-muted);
  font-size: 0.875rem;
  font-weight: 400;
  text-align: right;
}
.hs-page-upgradesummary .hs-upgrade-table tfoot .hs-upgrade-total th,
.hs-page-upgradesummary .hs-upgrade-table tfoot .hs-upgrade-total td {
  color: var(--hs-foreground);
  font-size: 1rem;
  font-weight: 600;
}
.hs-page-upgradesummary .hs-upgrade-to { color: var(--hs-muted); padding: 0 4px; }
.hs-page-upgradesummary .hs-upgrade-logic { margin-top: 16px; }
.hs-page-upgradesummary .hs-upgrade-pay {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 8px;
}
.hs-page-upgradesummary .hs-upgrade-pay > .hs-svc-tile { margin: 0; }
.hs-page-upgradesummary .hs-upgrade-promo { flex-wrap: nowrap; }
.hs-page-upgradesummary .hs-upgrade-promo .input-group-append .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  white-space: nowrap;
}

/* Billing period (server/hostsrc_billing_period.php): one row per period, a radio, its
   name, the discount or "Current", and the price right-aligned in mono. Same row look as
   the payment options on Add Funds (page-payments.css .hs-pay-option). */
.hs-page-clientareaproductdetails .hs-svc-period-lead { max-width: 64ch; margin: 0 0 16px; color: var(--hs-muted); text-wrap: pretty; }
.hs-page-clientareaproductdetails .hs-svc-period-lead .hs-data { color: var(--hs-foreground); }
.hs-page-clientareaproductdetails .hs-svc-period-lead a { color: var(--hs-foreground); text-decoration: underline; text-underline-offset: 2px; }
.hs-page-clientareaproductdetails .hs-svc-period-options { display: grid; gap: 8px; max-width: 560px; margin: 0 0 16px; padding: 0; border: 0; }
.hs-page-clientareaproductdetails .hs-svc-period-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--hs-input);
  border-radius: var(--hs-radius-md);
  background: var(--hs-fill);
  cursor: pointer;
}
.hs-page-clientareaproductdetails .hs-svc-period-option:hover { background: var(--hs-fill-hover); }
.hs-page-clientareaproductdetails .hs-svc-period-option:has(input:checked) { border-color: oklch(1 0 0 / 55%); background: var(--hs-control); }
.hs-page-clientareaproductdetails .hs-svc-period-option:has(input:focus-visible) { outline: 2px solid var(--hs-ring); outline-offset: 2px; }
.hs-page-clientareaproductdetails .hs-svc-period-option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--hs-foreground);
}
.hs-page-clientareaproductdetails .hs-svc-period-option input:focus-visible { outline: 0; }
.hs-page-clientareaproductdetails .hs-svc-period-name { color: var(--hs-foreground); font-weight: 600; }
.hs-page-clientareaproductdetails .hs-svc-period-note { color: var(--hs-muted); font-size: 0.8125rem; }
.hs-page-clientareaproductdetails .hs-svc-period-price { margin-left: auto; color: var(--hs-foreground); font-size: 0.9375rem; white-space: nowrap; }
.hs-page-clientareaproductdetails .hs-svc-billing-actions .btn[aria-current="true"] { border-color: oklch(1 0 0 / 55%); background: var(--hs-control); }
/* The title takes focus when the page opens on the tile (page-services.js); it is not a control. */
.hs-page-clientareaproductdetails .hs-svc-period .hs-svc-tile-title:focus { outline: 0; }
/* Renew (server/hostsrc_renew.php): the period tile's look, one months dropdown. */
.hs-page-clientareaproductdetails .hs-svc-renew-field { max-width: 560px; margin: 0 0 16px; }
.hs-page-clientareaproductdetails .hs-svc-renew-field label { display: block; margin: 0 0 6px; color: var(--hs-foreground); font-weight: 600; }
.hs-page-clientareaproductdetails .hs-svc-renew-until { margin: 8px 0 0; color: var(--hs-muted); }
.hs-page-clientareaproductdetails .hs-svc-renew-until .hs-data { color: var(--hs-foreground); }
.hs-page-clientareaproductdetails .hs-svc-renew .hs-svc-tile-title:focus { outline: 0; }
