/*!
 * foundation26 – Browser reset
 * Base element styles for the frontend; loaded with the page CSS and in the Quick Setup preview.
 * © 2026 Atelier 26 AG – part of digiscapes®. All rights reserved. digiscapes® and brandscapes® are registered trademarks.
 */

/* === Reset === */
* {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100svh !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

/* === Scroll and Selection === */
@media (prefers-reduced-motion: no-preference) {
  :has(:target) {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--bs-gutter-y) * 2.5);
  }
}

:target {
  scroll-margin-top: calc(var(--bs-gutter-y) * 2.5);
}

::selection {
  background: hsl(from var(--bs-primary-base) h s l / 0.3);
}

/* === Media === */
img {
  object-fit: cover;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  font-style: italic; /* alt text */
  shape-margin: 0.75rem;
}

svg {
  vertical-align: middle;
}

picture {
  display: block;
  overflow: hidden;
}

img[src$=".svg"] {
  width: 100%;
  height: max-content;
  object-fit: contain;
}

/* Non-inlinable SVG fills the same box as an inline one; must outrank img[src$=".svg"] */
.image-item > img.image-embed-item,
.image-item > :is(svg, .f26-svg-lazy),
:is(svg, .f26-svg-lazy).image-embed-item.svg-original {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

/* The drawing hidden for the crop copies (Image, Background): its masks, clip paths, patterns and filters stay visible,
   the copies paint with them; hidden, a mask is empty and hides the whole copy (1.18.612). */
svg.svg-crop-desktop :is(mask, clipPath, pattern, marker, filter) {
  visibility: visible;
}

/* Image: crops Tablet and Mobile of an inline SVG (1.18.609). The copies follow the drawing as siblings, one shows per
   breakpoint. The hidden drawing keeps painting (visibility, not display): the copies draw it with <use>. */
svg.svg-original.svg-crop:is(.svg-crop-tablet, .svg-crop-mobile) {
  display: none;
}
@media (max-width: 1023.98px) {
  svg.svg-original.svg-crop-desktop:has(~ .svg-crop-tablet) {
    position: absolute;
    width: 0;
    height: 0;
    visibility: hidden;
  }
  svg.svg-original.svg-crop.svg-crop-tablet {
    display: block;
  }
}
@media (max-width: 767.98px) {
  svg.svg-original.svg-crop-desktop:has(~ .svg-crop-mobile) {
    position: absolute;
    width: 0;
    height: 0;
    visibility: hidden;
  }
  svg.svg-original.svg-crop.svg-crop-tablet:has(~ .svg-crop-mobile) {
    display: none;
  }
  svg.svg-original.svg-crop.svg-crop-mobile {
    display: block;
  }
}

iframe {
  border: 0;
}

/* === Tables === */
table {
  caption-side: bottom;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

caption {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: var(--bs-body-secondary-color);
  text-align: left;
}

th {
  text-align: inherit;
  text-align: -webkit-match-parent;
}

thead,
tbody,
tfoot,
tr,
td,
th {
  border: 0 solid;
  border-color: inherit;
}

/* === Forms === */
label,
output {
  display: inline-block;
}

input,
button,
select,
optgroup,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  border-radius: 0;
}

button,
select {
  text-transform: none;
}

button:focus:not(:focus-visible) {
  outline: 0;
}

button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled),
[role=button] {
  cursor: pointer;
}

select:disabled {
  opacity: 1; /* iOS dims disabled selects */
}

textarea {
  resize: vertical;
}

fieldset {
  min-width: 0;
  border: 0;
}

legend {
  float: left;
  width: 100%;
  margin-bottom: 0.5rem;
  font-size: calc(1.275rem + 0.3vw);
  line-height: inherit;
}
@media (min-width: 1280px) {
  legend {
    font-size: 1.5rem;
  }
}
legend + * {
  clear: left;
}

/* Datalist: no picker arrow, except on date and time inputs */
[list]:not([type=date], [type=datetime-local], [type=month], [type=week], [type=time])::-webkit-calendar-picker-indicator {
  display: none !important;
}

::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field,
::-webkit-color-swatch-wrapper {
  padding: 0;
}

[type=search] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::file-selector-button {
  font: inherit;
}

/* === Interactive === */
summary {
  display: list-item;
  cursor: pointer;
}

progress {
  vertical-align: baseline;
}

/* === TYPO3 === */
.extbase-debugger-floating {
  position: absolute;
}
.extbase-debugger {
  z-index: 40000;
  overflow-y: scroll;
  position: absolute;
}
.extbase-debug-header {
  color: gray;
}

#typo3-preview-info {
  padding: 6px 8px !important;
  background: #0ea5e9 !important;
  border: 1px solid #0284c7 !important;
  font-size: 12px !important;
  color: #FFF !important;
  border-radius: 8px !important;
  line-height: 1.5 !important;
}
#typo3-preview-info a {
  color: #FFF !important;
  text-decoration: underline !important;
}
