/* Customer portal typography, including standalone forms and native dialogs.
   The shell condition excludes the cart, authentication and administration.
   Page titles, metric values, navigation groups and responsive tables keep
   their own roles. Load after portal-workspace.css and portal-polish.css. */
body:has(.hw-portal-shell) {
  --hw-portal-control-height:40px;
}

/* Standalone module pages have no .module-content ancestor. */
.hw-portal-shell :is(.hw-content-section,.hw-workspace,.card-body,.card-footer) {
  font-size:14px;
  line-height:1.6;
}
.hw-portal-shell .hw-workspace-panel-body {
  font-size:14px;
  line-height:1.6;
}
.hw-portal-shell .card-header :is(h2,h3,h4,h5,h6) {
  font-size:16px;
  font-weight:600;
  line-height:1.4;
}
.hw-portal-shell .hw-workspace-panel-body :is(h2,h3),
.hw-portal-shell .card-body > :is(h2,h3) {
  font-size:16px;
  font-weight:600;
  line-height:1.4;
}
.hw-portal-shell .hw-workspace-panel-body :is(h4,h5,h6),
.hw-portal-shell .card-body > :is(h4,h5,h6) {
  font-size:14px;
  font-weight:600;
  line-height:1.5;
}
.hw-portal-shell :is(.hw-workspace,.hw-content-section) form :is(label,.form-label) {
  font-size:13px;
  line-height:1.5;
}
.hw-portal-shell :is(.hw-workspace,.hw-content-section) form .hw-workspace-check {
  font-size:14px;
  line-height:1.6;
}
.hw-portal-shell :is(.hw-workspace,.hw-content-section) form legend {
  font-size:14px;
  font-weight:600;
  line-height:1.5;
}
.hw-portal-shell :is(.hw-workspace,.hw-content-section) .form-text {
  font-size:12px;
  line-height:1.6;
}
.hw-portal-shell :is(.hw-workspace,.hw-content-section) :is(.form-control,.form-select) {
  font-size:14px;
  line-height:1.5;
}
.hw-portal-shell .hw-workspace :is(input.form-control:not([type="hidden"],[type="checkbox"],[type="radio"],[type="file"],[type="range"],[type="color"]),select.form-control:not([multiple]):not([size]),select.form-select:not([multiple]):not([size])),
.hw-portal-shell .hw-workspace form .btn:not(.btn-link) {
  min-height:var(--hw-portal-control-height);
  padding-block:8px;
  line-height:1.5;
}

/* Domain choices and the change preview share the form rhythm. */
.hw-portal-shell .hw-workspace .hw-domain-choice-list {
  display:grid;
  gap:12px;
  min-width:0;
}
.hw-portal-shell .hw-workspace .hw-dns-preview-item {
  display:grid;
  gap:12px;
  min-width:0;
  padding-block:16px;
}
.hw-portal-shell .hw-workspace .hw-dns-preview-item + .hw-dns-preview-item {
  border-top:1px solid var(--portal-border);
}
.hw-portal-shell .hw-workspace :is(.hw-domain-choice-list,.hw-dns-preview-item) > * {
  min-width:0;
  max-width:100%;
}
.hw-portal-shell .hw-workspace .hw-dns-preview-item > :is(p,h3,h4) {
  margin:0;
}
.hw-portal-shell .hw-domain-contact-details > summary {
  padding:20px 22px;
  font-size:16px;
  font-weight:600;
  line-height:1.4;
  cursor:pointer;
}
.hw-portal-shell .hw-domain-contact-details[open] > summary {
  border-bottom:1px solid var(--portal-border);
}
.hw-portal-shell .hw-workspace-metrics--domain form:has(> .hw-domain-metric-action) {
  margin-top:0;
}
.hw-portal-shell .hw-workspace-metrics--domain .hw-domain-metric-action {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:36px;
  margin-top:12px;
  padding:7px 12px;
  font-size:14px;
  line-height:1.4;
  white-space:normal;
}
.hw-portal-shell [data-hw-transfer-lock-notice] p {
  font-size:14px;
  line-height:1.6;
}

/* Native confirmation dialogs may be moved to body by the modal helper.
   :has() keeps this rule exclusive to a rendered customer portal shell. */
body:has(.hw-portal-shell) .modal-content {
  font-family:var(--font-sans);
  font-size:14px;
  line-height:1.6;
}
body:has(.hw-portal-shell) .modal .modal-title {
  /* Some native titles carry Bootstrap's !important .fs-5 utility. */
  font-size:16px!important;
  font-weight:600;
  line-height:1.4;
}
body:has(.hw-portal-shell) .modal :is(.modal-body,.modal-footer,.alert) {
  font-size:14px;
  line-height:1.6;
}
body:has(.hw-portal-shell) .modal :is(label,.form-label) {
  font-size:13px;
  line-height:1.5;
}
body:has(.hw-portal-shell) .modal legend {
  font-size:14px;
  font-weight:600;
  line-height:1.5;
}
body:has(.hw-portal-shell) .modal .form-text {
  font-size:12px;
  line-height:1.6;
}
body:has(.hw-portal-shell) .modal :is(.form-control,.form-select) {
  font-family:var(--font-sans);
  font-size:14px;
  line-height:1.5;
  min-height:var(--hw-portal-control-height);
}
body:has(.hw-portal-shell) .modal .btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:var(--hw-portal-control-height);
  padding:8px 12px;
  font-family:var(--font-sans);
  font-size:13px;
  line-height:1.5;
  white-space:normal;
}

/* The account header precedes the shell in the document. */
body:has(.hw-portal-shell) .hw-portal-header .hw-v2-account-panel,
.hw-portal-shell .dropdown-menu {
  font-size:14px;
  line-height:1.5;
}
.hw-portal-shell .dropdown-menu :is(.dropdown-item,.dropdown-header) {
  font-size:13px;
  line-height:1.5;
  white-space:normal;
}

@media(max-width:900px) {
  body:has(.hw-portal-shell) { --hw-portal-control-height:44px; }
  .hw-portal-shell .hw-workspace-metrics--domain .hw-domain-metric-action { min-height:44px; }
}
@media(max-width:700px) {
  .hw-portal-shell .hw-domain-contact-details > summary { padding:16px; }
  /* Preserve readable controls and prevent focus zoom in mobile Safari. */
  .hw-portal-shell :is(.hw-workspace,.hw-content-section) :is(.form-control,.form-select),
  body:has(.hw-portal-shell) .modal :is(.form-control,.form-select) {
    font-size:16px;
  }
}

/* Keep complete addresses readable in the narrow DNS comparison viewport. */
.hw-portal-shell :is([data-website-dns],[data-website-dns-batch]) .table-responsive table {
  min-width:560px;
}
.hw-portal-shell :is([data-website-dns],[data-website-dns-batch]) .table-responsive td:not([colspan]) {
  white-space:nowrap;
  word-break:normal !important;
  overflow-wrap:normal !important;
}

/* Keep domain actions at the bottom of equal-height cards, regardless of copy. */
.hw-portal-shell .hw-workspace-metrics--domain > article:has(.hw-domain-metric-action),
.hw-portal-shell .hw-workspace-metrics--domain > article:has(.hw-domain-metric-action) > div {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.hw-portal-shell .hw-workspace-metrics--domain > article:has(.hw-domain-metric-action) > div {
  flex:1;
  width:100%;
}
.hw-portal-shell .hw-workspace-metrics--domain > article:has(.hw-domain-metric-action) > div > strong {
  margin-bottom:12px;
}
.hw-portal-shell .hw-workspace-metrics--domain > article > .hw-domain-metric-action,
.hw-portal-shell .hw-workspace-metrics--domain > article > div > .hw-domain-metric-action,
.hw-portal-shell .hw-workspace-metrics--domain > article > div > form:has(.hw-domain-metric-action) {
  margin-top:auto;
}
.hw-portal-shell .hw-workspace-metrics--domain > article > div > form > .hw-domain-metric-action {
  margin-top:0;
}
