.dw-sizechart { margin: 12px 0; }
.dw-sizechart-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.dw-sizechart-icon { flex: 0 0 auto; }
.dw-sizechart-link.dw-sizechart-hidden { display: none; }
.dw-sizechart:has(.dw-sizechart-hidden) { margin: 0; }

/* Link placed under the "Size:" label, next to the size buttons */
.dw-sizechart-near-sizes {
  display: flex; width: max-content; max-width: 100%; margin-top: 8px; padding: 4px 9px;
  border: 1px solid currentColor; border-radius: 3px; font-size: 13px; font-weight: 600;
  line-height: 1.2; text-decoration: none; white-space: nowrap;
}
.dw-sizechart-near-sizes:hover, .dw-sizechart-near-sizes:focus { text-decoration: underline; }
.dw-sizechart-near-sizes .dw-sizechart-icon { width: 16px; height: 16px; }

.dw-sizechart-modal { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10050; }
.dw-sizechart-modal.is-open { display: block; }
.dw-sizechart-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .55); }
.dw-sizechart-dialog {
  position: relative; box-sizing: border-box; width: calc(100% - 32px); max-width: 640px;
  max-height: calc(100vh - 64px); overflow: auto; margin: 32px auto; padding: 28px 20px 20px;
  background: #fff; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.dw-sizechart-close {
  position: absolute; top: 6px; right: 10px; padding: 0 6px; border: 0; background: none;
  font-size: 30px; line-height: 1; color: #333; cursor: pointer;
}
.dw-sizechart-body table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.dw-sizechart-body th, .dw-sizechart-body td { border: 1px solid #ddd; padding: 6px 8px; text-align: center; }
.dw-sizechart-body thead th { background: #222; color: #fff; }
.dw-sizechart-body tbody tr:nth-child(even) td { background: #f6f6f6; }
.dw-sizechart-body img { max-width: 100%; height: auto; }
body.dw-sizechart-lock { overflow: hidden; }
@media (max-width: 575px) {
  .dw-sizechart-near-sizes { width: auto; white-space: normal; padding: 3px 7px; font-size: 12px; border-radius: 3px; }
  .dw-sizechart-near-sizes .dw-sizechart-icon { display: none; }
}
