/**
 * Size guide link and modal, styled after the Print Oracle product page size
 * chart. Scoped under `.po-size-guide` / the link class so theme rules for
 * `button`, `table`, `h2` do not bleed in; the dialog pins its own font stack
 * for the same reason.
 */
.po-size-guide-link {
  appearance: none;
  display: inline-block;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  color: #0079dc;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.po-size-guide-link:hover,
.po-size-guide-link:focus-visible {
  color: #006ac2;
}

.po-size-guide {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.po-size-guide[hidden] {
  display: none;
}

.po-size-guide__dialog {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow: auto;
  padding: 32px 24px 24px;
  border-radius: 12px;
  background: #f5f8fb;
  color: #0f172a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* WooCommerce themes may reduce the root size; preserve a readable floor. */
  font-size: max(16px, 1rem);
  line-height: 1.5;
}

.po-size-guide__close {
  appearance: none;
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.5em;
  line-height: 1;
  color: inherit;
  cursor: pointer;
}

.po-size-guide__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  text-align: center;
}

.po-size-guide__title {
  margin: 0;
  font: inherit;
  font-size: 1.5em;
  font-weight: 700;
  color: #0f172a;
}

.po-size-guide__subtitle {
  margin: 0;
  font: inherit;
  color: #475569;
}

.po-size-guide__units {
  display: inline-flex;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.po-size-guide__units button {
  appearance: none;
  margin: 0;
  padding: 8px 16px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1em;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
}

.po-size-guide__units button[aria-pressed="true"] {
  background: #0f172a;
  color: #fff;
}

.po-size-guide__body {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .po-size-guide__body--image {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}

.po-size-guide__figure {
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.po-size-guide__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.po-size-guide__scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.po-size-guide__table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font: inherit;
}

.po-size-guide__table th,
.po-size-guide__table td {
  padding: 12px 24px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
  background: none;
  font: inherit;
}

.po-size-guide__table th {
  background: #e9eff5;
  font-size: 1em;
  font-weight: 700;
  color: #374151;
  text-transform: none;
  white-space: normal;
}

.po-size-guide__table td {
  font-size: 1em;
  font-weight: 700;
  color: #0f172a;
}

.po-size-guide__table td:first-child {
  font-size: 1.125em;
  text-transform: uppercase;
}

.po-size-guide__table tr:last-child td {
  border-bottom: 0;
}

.po-size-guide__table tbody tr:hover td {
  background: #e9eff5;
}

.po-size-guide__note {
  margin: 24px 0 0;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #e9eff5;
  font-size: 1em;
  color: #475569;
}

.po-size-guide__note strong {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
  color: #374151;
}

.po-size-guide__note p {
  margin: 0 0 8px;
  font: inherit;
}

.po-size-guide__note p:last-child {
  margin-bottom: 0;
}
