/* ============================================================
   SPARK CORE CSS
   Enthält ausschließlich funktionale Styles:
   - Layout-Reset
   - Core-Variables (technisch notwendig)
   - Responsive Units
   - Aspect-Ratio Handling
   - Render-/Transit-Container
   - Button/Action-Baseline
   KEINE Farben, KEINE Abstände, KEIN Design
============================================================ */

/* -------------------------
   Root technische Variablen
-------------------------- */
:root {
  --spark-transition-time: 0.3s;
}

/* -------------------------
   System Reset
-------------------------- */
html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

/* -------------------------
   Spark Component Container
-------------------------- */
[data-spark] {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  box-sizing: border-box;
  /* overflow: hidden; */
}

/* Aspect Ratio Presets */
[data-spark][data-spark-aspect='classic'] {
  aspect-ratio: 4/3;
}
[data-spark][data-spark-aspect='square'] {
  aspect-ratio: 1/1;
}
[data-spark][data-spark-aspect='portrait'] {
  aspect-ratio: 3/4;
}
[data-spark][data-spark-aspect='wide'] {
  aspect-ratio: 16/3;
}

/* Wenn ein Component selbst rendert → Ratio deaktivieren */
[data-spark]:has(.inner) {
  aspect-ratio: auto;
}

/* -------------------------
   Render Wrapper
-------------------------- */
[data-spark] > .inner {
  display: block;
  margin-block: 0;
  padding: 0;
  width: 100%;
  height: auto;
  box-sizing: border-box;
}

/* -------------------------
   Transit Animation Layer
-------------------------- */
[data-spark] .spark-transit {
  transition: all var(--spark-transition-time) ease-in-out !important;
}

[data-spark] .spark-transit > * {
  transition: none !important;
}

/* -------------------------
   Action Base Styling (neutral)
-------------------------- */
.spark-action {
  cursor: pointer;
  user-select: none;
}

.spark-action:disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}

.browser-warning {
    width: 100%;
    padding: 2rem;
    text-align: center;
    border: 1px solid #dfdfdf;
    box-shadow: 0 0 20px -20px #000;
    max-width: 54ch;
    margin: 4rem auto;
}
