.ht-size-guide {
  min-inline-size: 0;
  max-inline-size: 100%;
}

.ht-size-guide__scroll {
  overflow-x: auto;
  border-radius: var(--ht-shop-radius, 15px);
}

.ht-size-guide table {
  --ht-size-guide-radius: var(--ht-shop-radius, 15px);
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .8em;
  line-height: 1.4;
}

.ht-size-guide table :is(th, td) { padding: .25em .4em; font-size: inherit; }
.ht-size-guide table th { color: var(--ht-navy, inherit); }
.ht-size-guide table tr > :not(:first-child) { border-inline-start: 0; }
.ht-size-guide table tbody tr > * { border-block-start: 0; }
.ht-size-guide table thead tr:first-child > :first-child { border-start-start-radius: var(--ht-size-guide-radius); }
.ht-size-guide table thead tr:first-child > :last-child { border-start-end-radius: var(--ht-size-guide-radius); }
.ht-size-guide table tbody tr:last-child > :first-child { border-end-start-radius: var(--ht-size-guide-radius); }
.ht-size-guide table tbody tr:last-child > :last-child { border-end-end-radius: var(--ht-size-guide-radius); }

.ht-size-guide__notes {
  margin-block-start: var(--ht-shop-gap, var(--wp--preset--spacing--40, 1rem));
  padding: var(--ht-shop-inset, var(--wp--preset--spacing--50, 1.5rem));
  border: 1px solid var(--mfn-tabs-border-color, currentColor);
  border-radius: var(--ht-shop-radius, 15px);
  background: var(--ht-blue-light, transparent);
}

.ht-size-guide .ht-size-guide__notes h3 {
  margin: 0;
  font-size: 1em;
  line-height: 1.3;
}

.ht-size-guide__notes ul {
  margin: 0;
  padding: .35em 0 .2em 1.5em;
  list-style: disc outside;
}

.ht-size-guide__notes-toggle {
  margin-block-start: 4px;
  text-align: end;
}

.ht-size-guide__notes-toggle > summary {
  display: inline-flex;
  min-block-size: 24px;
  margin-inline-end: 10px;
  align-items: center;
  gap: .25em;
  cursor: pointer;
  list-style: none;
  color: var(--ht-blue);
  font-weight: 700;
  text-decoration: none;
}

.ht-size-guide__notes-toggle > .ht-size-guide__notes { text-align: start; }

.ht-size-guide__notes-toggle > summary::-webkit-details-marker { display: none; }
.ht-size-guide__notes-toggle > summary:hover { text-decoration: underline; }
.ht-size-guide__notes-toggle > summary:focus-visible {
  outline: 2px solid var(--ht-pink);
  outline-offset: 4px;
}

.ht-size-guide__notes-toggle:not([open]) .icon-up-open-big,
.ht-size-guide__notes-toggle[open] .icon-down-open-big { display: none; }

@supports (interpolate-size: allow-keywords) and selector(::details-content) {
  @media (prefers-reduced-motion: no-preference) {
    .ht-size-guide__notes-toggle { interpolate-size: allow-keywords; }

    .ht-size-guide__notes-toggle::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 180ms ease, content-visibility 180ms allow-discrete;
    }

    .ht-size-guide__notes-toggle[open]::details-content { block-size: auto; }
  }
}
