/* Keep account forms independent of the cart's fixed-width checkout column. */
body:not(.admin-layout-active) :is(.customer-access-head, .customer-layout) {
  /* Override the shared desktop rule that forces panels to viewport width. */
  width: min(1080px, calc(100% - 40px)) !important;
  max-width: none;
  margin-inline: auto;
}

.customer-access-head {
  padding: 24px;
}

.customer-access-head h1 { font-size: 28px; }
.customer-access-head p:not(.eyebrow) { max-width: 680px; font-size: 15px; line-height: 1.6; }

.checkout-layout.customer-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 48px;
  margin-top: 32px;
}

body:not(.admin-layout-active) .customer-layout > :is(.form-panel, .checkout-panel) {
  position: static;
  display: grid;
  align-content: start;
  gap: 18px;
  width: 100% !important;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-layout .customer-access-panel > div:first-child,
.customer-layout .checkout-panel-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.customer-layout h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

.customer-layout .customer-access-panel > form { display: grid; gap: 18px; }
.customer-layout label:not(.checkline) {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
}

.customer-layout :is(input:not([type="checkbox"]), select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 4px;
}

.customer-layout .form-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.customer-layout .customer-password-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-layout .customer-postcode-row { grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1.25fr); }
.customer-layout .button { min-height: 46px; border-radius: 4px; white-space: normal; }
.customer-layout :is(.muted-line, .muted-link, .checkline) {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.customer-layout .muted-link { width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.customer-layout .checkline { align-items: flex-start; }
.customer-layout .checkline input { flex: 0 0 auto; margin-top: 4px; }
.customer-layout .form-alert { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .checkout-layout.customer-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  body:not(.admin-layout-active) :is(.customer-access-head, .customer-layout) { width: min(620px, calc(100% - 32px)) !important; }
}

@media (max-width: 540px) {
  .customer-access-head { padding: 20px; }
  .customer-access-head h1 { font-size: 26px; }
  .customer-layout h2 { font-size: 22px; }
  .customer-layout .form-row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
