/* W4dev Theme base. Compile assets/scss/base.scss locally; put site edits in custom.css. */
:where(.wp-site-blocks, .editor-styles-wrapper) *,
:where(.wp-site-blocks, .editor-styles-wrapper) *::before,
:where(.wp-site-blocks, .editor-styles-wrapper) *::after {
  box-sizing: border-box;
}

:where(.wp-site-blocks, .editor-styles-wrapper) {
  overflow-wrap: break-word;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(img, video) {
  max-width: 100%;
  height: auto;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(input, textarea, select, button) {
  font: inherit;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]), textarea, select) {
  max-width: 100%;
  padding: var(--wp--preset--spacing--xs);
  color: inherit;
  background: var(--wp--preset--color--background);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--wp--custom--border--radius);
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--accent);
  outline-offset: var(--wp--custom--focus--offset);
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(a) {
  text-underline-offset: 0.18em;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(pre) {
  overflow-x: auto;
}

.wp-site-blocks > :where(header, main, footer) {
  margin-block-start: 0;
}

.w4-container {
  width: 100%;
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding-inline: var(--wp--custom--layout--gutter);
}

.w4-section {
  padding-block: var(--wp--custom--layout--section);
}

.w4-stack > * {
  margin-block: 0;
}

.w4-stack > * + * {
  margin-block-start: var(--wp--custom--layout--gap);
}

.w4-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--wp--custom--layout--grid-min)), 1fr));
  gap: var(--wp--custom--layout--gap);
}

.w4-grid > * {
  min-width: 0;
}

/* Use on anchors or buttons in raw HTML; native Button blocks use theme.json. */
.w4-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--wp--preset--spacing--xs);
  cursor: pointer;
  padding: var(--wp--custom--button--padding-y) var(--wp--custom--button--padding-x);
  border: 0;
  border-radius: var(--wp--custom--border--radius);
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--accent-contrast);
  font-weight: var(--wp--custom--button--weight);
  text-decoration: none;
}

.w4-button:disabled {
  cursor: default;
  opacity: 0.6;
}
