/* The legacy sheet uses repeated :is(html, #xl_) selectors; scope overrides here to Apple Watch. */
:is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_):is(html, #xl_) .cstrap-section {
  & .capw[hidden] { display: none; }
  & .capw { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--apw-gap); }
  & .capw .cfield { min-width: 0; }
  & .capw :is(input:not([type="radio"]), select) { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
  &.is-apw select[id$="-thickness"] option:disabled { color: #888; }
  /* "None" buckle is not offered with Apple Watch (adapter + buckle come as one set). */
  &.is-apw .cswatch:has(> input[name="properties[Buckle Finish]"][value="None"]) { display: none; }
  & .capw__note { margin: .2rem 0 .6rem; font-size: var(--apw-note); line-height: 1.4; opacity: .78; }
  & .capw__note[hidden] { display: none; }
  & .capw__help { margin-left: .6rem; vertical-align: baseline; }
  & .capw__help[hidden] { display: none; }
  @media (max-width: 749px) {
    --apw-gap: 12px;
    --apw-note: 13px;
    &.is-apw :is(input, select, textarea) { font-size: 16px; }
    & .capw :is(input:not([type="radio"]), select) { min-height: 44px; }
  }
  @media (min-width: 750px) {
    --apw-gap: 16px;
    --apw-note: 14px;
    & .capw { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    & .capw :is(input:not([type="radio"]), select) { font-size: 14px; min-height: 46px; }
  }
}

/* "?" guide popup for Apple Watch styles: the modal is moved to <body>, so no section prefix; same :is(#cpop-x, .chelp-lb) weight as cstrap-popup.css. */
:is(#cpop-x, .chelp-lb):not([hidden]):not(:has(.csum-full)):has(.capw-guide) { --cpop-w: min(920px, 100%); }
:is(#cpop-x, .chelp-lb):not(:has(.csum-full)) .capw-guide { margin: 16px 0 0; }
:is(#cpop-x, .chelp-lb):not(:has(.csum-full)) .capw-guide img { display: block; width: 100%; height: auto; max-width: 100%; margin: 0 auto; }
@media (max-width: 749px) {
  :is(#cpop-x, .chelp-lb):not(:has(.csum-full)) .capw-guide { margin: 12px 0 0; }
}
