/*
 Theme Name:   Sharpdecade Theme
 Description:  Bricks theme extension by #decade.
 Author:       Athanasios Grivas
 Author URI:   https://sharpdeca.de/
 Template:     bricks
 Version:      1.0
 Text Domain:  bricks
*/

/*------------------------------------*
  #GENERIC
*------------------------------------*/

/* a. Intuitive box-sizing model */
:where(*, *::before, *::after) {
  box-sizing: border-box;
}

/* b. Remove default margin */
:where(body, h1, h2, h3, h4, p, figure, blockquote, dl, dd) {
  margin-block-end: 0;
}

/* c. Full-height layouts + better typography */
:where(html, body) {
  block-size: 100%;
}
:where(html) {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  color-scheme: light dark;
  hanging-punctuation: first allow-end last;
}
:where(body) {
  line-height: 1.5;
  min-block-size: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* f. Media defaults */
:where(img, picture, video, canvas, svg, iframe) {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
  border-style: none;
}

:where(figure) {
  inline-size: fit-content;
  margin-inline: auto;
}

:where(figcaption) {
  contain: inline-size;
  font-size: var(--text-s);
}

/* g. Inherit form styles */
:where(input, button, textarea, select) {
  font: inherit;
}

/* h. Text overflow protection */
:where(p, h1, h2, h3, h4, h5, h6) {
  overflow-wrap: break-word;
}

/* i. Image styles (per Harry Roberts) */
:where(img) {
  shape-margin: 0.75rem;
  font-style: italic;
  font-size: var(--h2);
  line-height: 1.5;
  text-wrap: balance;
}

/* j & k. Headings and interactive elements */
:where(h1, h2, h3, h4, h5, h6, button, input, label) {
  line-height: 1.1;
  text-wrap: balance;
}

/* l. Textarea size */
:where(textarea:not([rows])) {
  min-block-size: 10em;
}

/* m. Anchor target spacing */
:where(:target) {
  scroll-margin-block: 5ex;
}

/* n. Default link styles */
:where(a:not([class])) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* q. Link icon styling */
a:has(> svg)::after {
  display: none;
}

a[target='_blank']:where(:not(:has(> img, > figure, > picture, > svg)))::after {
  mask: linear-gradient(black 90%, transparent 90%);
  font-family: system-ui, sans-serif;
}

/*------------------------------------*
  #BASE
*------------------------------------*/

/* CTA margin */
:where(*:not([class*='btn--']) + [class*='btn--']) {
  margin-block-start: var(--space-s);
}

/* Figcaption */
:where(figcaption) {
  max-inline-size: max-content;
  margin-inline: auto;
}

/* Focus-visible outlines */
:where(a:focus-visible) {
  outline-offset: 0.25em;
  outline-width: 0.25em;
  outline-color: currentColor;
}

/* Typography layout */
:where(ul, ol, dl, dt, dd, p, figure, blockquote) {
  text-wrap: pretty;
}

/* Scrollbars */
html {
  overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) {
  html {
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}

/* Lists */
:where(ul, ol, dl):not(.options-wrapper) {
  margin: 0;
  padding: 0;
  ul,
  ol,
  dl {
    padding-inline-start: 2ch;
  }
}

/* Page transitions */
@view-transition {
  navigation: auto;
}

/* Focus visible radius */
body.bricks-is-frontend.bricks-is-frontend :focus-visible {
  border-radius: var(--radius);
}

/* Footer and header background */
footer, header {
  background-color: var(--base-ultra-light);
  background-image: url("/wp-content/uploads/pi-sand.v5.05.svg");
  background-repeat: repeat;
  background-size: 100px 100px;
}

/*------------------------------------*
  #BRICKS CONFIG
*------------------------------------*/

#bricks-preview-element-actions {
  display: none !important;
}