/*
 * Asgard Page Shell
 *
 * Single canonical wrapper that locks page geometry across all customer themes.
 * All sizing comes from CSS custom properties set by Asgard_Page_Shell::render_css_variables.
 *
 * Theme-isolation reset classes (asgard-shell-iso-*) opt in/out of resets per
 * tenant preference (set in Asgard admin → WordPress UI → Layout).
 */

.asgard-page-shell,
.asgard-page-shell {
  box-sizing: border-box;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--asgard-page-padding-inline, var(--asgard-page-padding-inline, 1rem));
}

.asgard-page-shell *,
.asgard-page-shell *,
.asgard-page-shell *::before,
.asgard-page-shell *::before,
.asgard-page-shell *::after,
.asgard-page-shell *::after {
  box-sizing: border-box;
}

/* Per-page-type max-width — driven by CSS variables emitted by render_open */
.asgard-page-shell--product,
.asgard-page-shell--product,
.asgard-page-shell--ipbox,
.asgard-page-shell--ipbox,
.asgard-page-shell--checkout,
.asgard-page-shell--checkout {
  max-width: var(--asgard-page-max-width-default, var(--asgard-page-max-width-default, 960px));
}

.asgard-page-shell--archive,
.asgard-page-shell--archive {
  max-width: var(--asgard-page-max-width-archive, var(--asgard-page-max-width-archive, 1280px));
}

.asgard-page-shell--renewal,
.asgard-page-shell--renewal {
  max-width: var(--asgard-page-max-width-renewal, var(--asgard-page-max-width-renewal, 680px));
}

/* ---------------------------------------------------------------------------
 * Theme-isolation: typography reset
 * Active only when .asgard-shell-iso-typography is on the shell.
 * ------------------------------------------------------------------------ */

.asgard-page-shell.asgard-shell-iso-typography,
.asgard-page-shell.asgard-shell-iso-typography,
.asgard-page-shell.asgard-shell-iso-typography,
.asgard-page-shell.asgard-shell-iso-typography {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.asgard-page-shell.asgard-shell-iso-typography h1,
.asgard-page-shell.asgard-shell-iso-typography h1,
.asgard-page-shell.asgard-shell-iso-typography h1,
.asgard-page-shell.asgard-shell-iso-typography h1,
.asgard-page-shell.asgard-shell-iso-typography h2,
.asgard-page-shell.asgard-shell-iso-typography h2,
.asgard-page-shell.asgard-shell-iso-typography h2,
.asgard-page-shell.asgard-shell-iso-typography h2,
.asgard-page-shell.asgard-shell-iso-typography h3,
.asgard-page-shell.asgard-shell-iso-typography h3,
.asgard-page-shell.asgard-shell-iso-typography h3,
.asgard-page-shell.asgard-shell-iso-typography h3,
.asgard-page-shell.asgard-shell-iso-typography h4,
.asgard-page-shell.asgard-shell-iso-typography h4,
.asgard-page-shell.asgard-shell-iso-typography h4,
.asgard-page-shell.asgard-shell-iso-typography h4,
.asgard-page-shell.asgard-shell-iso-typography h5,
.asgard-page-shell.asgard-shell-iso-typography h5,
.asgard-page-shell.asgard-shell-iso-typography h5,
.asgard-page-shell.asgard-shell-iso-typography h5,
.asgard-page-shell.asgard-shell-iso-typography h6,
.asgard-page-shell.asgard-shell-iso-typography h6,
.asgard-page-shell.asgard-shell-iso-typography h6,
.asgard-page-shell.asgard-shell-iso-typography h6 {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  margin: 0 0 0.5em;
}

.asgard-page-shell.asgard-shell-iso-typography p,
.asgard-page-shell.asgard-shell-iso-typography p,
.asgard-page-shell.asgard-shell-iso-typography p,
.asgard-page-shell.asgard-shell-iso-typography p {
  margin: 0 0 1em;
}

.asgard-page-shell.asgard-shell-iso-typography a,
.asgard-page-shell.asgard-shell-iso-typography a,
.asgard-page-shell.asgard-shell-iso-typography a,
.asgard-page-shell.asgard-shell-iso-typography a {
  color: inherit;
  text-decoration: none;
}

.asgard-page-shell.asgard-shell-iso-typography a:hover,
.asgard-page-shell.asgard-shell-iso-typography a:hover,
.asgard-page-shell.asgard-shell-iso-typography a:hover,
.asgard-page-shell.asgard-shell-iso-typography a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
 * Theme-isolation: button reset
 * ------------------------------------------------------------------------ */

.asgard-page-shell.asgard-shell-iso-buttons button,
.asgard-page-shell.asgard-shell-iso-buttons button,
.asgard-page-shell.asgard-shell-iso-buttons button,
.asgard-page-shell.asgard-shell-iso-buttons button,
.asgard-page-shell.asgard-shell-iso-buttons .button,
.asgard-page-shell.asgard-shell-iso-buttons .button,
.asgard-page-shell.asgard-shell-iso-buttons .button,
.asgard-page-shell.asgard-shell-iso-buttons .button,
.asgard-page-shell.asgard-shell-iso-buttons input[type="submit"],
.asgard-page-shell.asgard-shell-iso-buttons input[type="submit"],
.asgard-page-shell.asgard-shell-iso-buttons input[type="submit"],
.asgard-page-shell.asgard-shell-iso-buttons input[type="submit"],
.asgard-page-shell.asgard-shell-iso-buttons input[type="button"],
.asgard-page-shell.asgard-shell-iso-buttons input[type="button"],
.asgard-page-shell.asgard-shell-iso-buttons input[type="button"],
.asgard-page-shell.asgard-shell-iso-buttons input[type="button"] {
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
 * Theme-isolation: form-element reset
 * ------------------------------------------------------------------------ */

.asgard-page-shell.asgard-shell-iso-forms input,
.asgard-page-shell.asgard-shell-iso-forms input,
.asgard-page-shell.asgard-shell-iso-forms input,
.asgard-page-shell.asgard-shell-iso-forms input,
.asgard-page-shell.asgard-shell-iso-forms select,
.asgard-page-shell.asgard-shell-iso-forms select,
.asgard-page-shell.asgard-shell-iso-forms select,
.asgard-page-shell.asgard-shell-iso-forms select,
.asgard-page-shell.asgard-shell-iso-forms textarea,
.asgard-page-shell.asgard-shell-iso-forms textarea,
.asgard-page-shell.asgard-shell-iso-forms textarea,
.asgard-page-shell.asgard-shell-iso-forms textarea {
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: normal;
}
