/* ==================================================
   FINAL OVERRIDES
   Hover + Cursor
   ================================================== */


/* Pinker Pfeil-Cursor auf allen klickbaren Elementen */

button,
a,
[role="button"],
.shapeOption,
.placedShape,
.deleteShapeButton,
.rotateHandle,
.infoCircle,
.startInfoButton,
#alphabetInfoButton,
#archiveButton,
#homeInfoButton,
#startHomeInfoButton,
#startButton,
#resetButton,
#lockButton,
#flipShapeButton,
#closeShapeControlPanelButton,
#closeAlphabetInfoButton,
#closeInfoAssistantButton,
#closeSaveConfirmationButton,
#closeHomeInfoPanelButton,
#archivePrevAlphabet,
#archiveNextAlphabet,
#prevSign,
#nextSign,
#prevAlphabet,
#nextAlphabet,
.navigationButton {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M4 3 L4 23 L10 17 L14 26 L18 24 L14 15 L23 15 Z' fill='%23ff1fd0' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 4 3, pointer !important;
}


/* Hover: alle Buttons schwarz mit weißem Text */

button:hover,
a:hover,
[role="button"]:hover,
.infoCircle:hover,
.startInfoButton:hover,
#alphabetInfoButton:hover,
#archiveButton:hover,
#homeInfoButton:hover,
#startHomeInfoButton:hover,
#startButton:hover,
#resetButton:hover,
#lockButton:hover,
#flipShapeButton:hover,
#closeShapeControlPanelButton:hover,
#closeAlphabetInfoButton:hover,
#closeInfoAssistantButton:hover,
#closeSaveConfirmationButton:hover,
#closeHomeInfoPanelButton:hover,
#archivePrevAlphabet:hover,
#archiveNextAlphabet:hover,
#prevSign:hover,
#nextSign:hover,
#prevAlphabet:hover,
#nextAlphabet:hover,
.navigationButton:hover,
.deleteShapeButton:hover,
.rotateHandle:hover {
  background: black !important;
  color: white !important;
}


/* Falls Text/SVGs innerhalb des Buttons sitzen */

button:hover *,
a:hover *,
.infoCircle:hover *,
.startInfoButton:hover *,
#alphabetInfoButton:hover *,
#archiveButton:hover *,
#homeInfoButton:hover *,
#startHomeInfoButton:hover *,
#startButton:hover *,
#resetButton:hover *,
#lockButton:hover *,
#flipShapeButton:hover *,
#closeShapeControlPanelButton:hover *,
#closeAlphabetInfoButton:hover *,
#closeInfoAssistantButton:hover *,
#closeSaveConfirmationButton:hover *,
#closeHomeInfoPanelButton:hover *,
#archivePrevAlphabet:hover *,
#archiveNextAlphabet:hover *,
#prevSign:hover *,
#nextSign:hover *,
#prevAlphabet:hover *,
#nextAlphabet:hover *,
.navigationButton:hover *,
.deleteShapeButton:hover *,
.rotateHandle:hover * {
  color: white !important;
}


/* Falls Home-Icon als Bild eingebaut ist */

#homeInfoButton:hover img {
  filter: brightness(0) invert(1) !important;
}


/* Schatten beim Hover behalten, aber etwas stärker */

button:hover,
a:hover,
#archiveButton:hover,
#alphabetInfoButton:hover,
#homeInfoButton:hover,
#startHomeInfoButton:hover,
#resetButton:hover,
#lockButton:hover,
.infoCircle:hover,
.navigationButton:hover,
#prevSign:hover,
#nextSign:hover,
#prevAlphabet:hover,
#nextAlphabet:hover {
  box-shadow: 8px 8px 0 black !important;
}

#drawPanel,
#drawingArea,
#placedShapesLayer {
  overflow: visible !important;
}

/* ===== Ausgewähltes Zeichen rechts sichtbar markieren ===== */

.placedShape.is-selected {
    outline: 2px solid black !important;
    outline-offset: 2px !important;
  
    box-shadow: none !important;
    filter: none !important;
  }
  
  .placedShape.is-selected img {
    filter: none !important;
  }

/* ===== Panels exakt mittig in ihren Interface-Feldern ===== */

#homeInfoPanel,
.infoPanel {
  position: fixed !important;
  

  right: auto !important;
  bottom: auto !important;
  top: 48% !important;

  transform: translate(-50%, -50%) scale(0.96) !important;
}

#homeInfoPanel.is-open,
.infoAssistant.is-open .infoPanel {
  transform: translate(-50%, -50%) scale(1) !important;
}

/* ==================================================
   Bottom Buttons: alle auf einer Linie
   Home + Fragezeichen identisch
   ================================================== */

   :root {
    --bottom-button-size: 58px;
    --bottom-button-bottom: 28px;
    --bottom-button-shadow: 6px 6px 0 black;
  }
  
  /* Home-Button und Fragezeichen-Button gleich groß und gleich positioniert */
  #homeInfoButton,
  .infoCircle {
    position: fixed !important;
  
    bottom: var(--bottom-button-bottom) !important;
  
    width: var(--bottom-button-size) !important;
    height: var(--bottom-button-size) !important;
    min-width: var(--bottom-button-size) !important;
    min-height: var(--bottom-button-size) !important;
  
    padding: 0 !important;
    margin: 0 !important;
  
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  
    background: #ff1fd0 !important;
    color: black !important;
  
    border: 2px solid black !important;
    border-radius: 50% !important;
  
    box-shadow: var(--bottom-button-shadow) !important;
  
    font-family: "MeineSchrift", sans-serif !important;
    font-size: 28px !important;
    font-weight: bold !important;
    line-height: 1 !important;
  
    text-transform: none !important;
    letter-spacing: 0 !important;
  
    cursor: pointer !important;
    z-index: 6000 !important;
  
    transform: none !important;
  }
  
  /* Home links unten */
  #homeInfoButton {
    left: 28px !important;
    right: auto !important;
    top: auto !important;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M4 3 L4 23 L10 17 L14 26 L18 24 L14 15 L23 15 Z' fill='%23ff1fd0' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 4 3, pointer !important;
  }
  
  /* Fragezeichen rechts unten */
  .infoCircle {
    right: 28px !important;
    left: auto !important;
    top: auto !important;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M4 3 L4 23 L10 17 L14 26 L18 24 L14 15 L23 15 Z' fill='%23ff1fd0' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 4 3, pointer !important;
  }
  
  /* Icon im Home-Button sauber skalieren */
  #homeInfoIcon {
    width: 56% !important;
    height: 56% !important;
    object-fit: contain !important;
    display: block !important;
    pointer-events: none !important;
  }
  
  /* Hover für beide gleich */
  #homeInfoButton:hover,
  .infoCircle:hover {
    background: black !important;
    color: white !important;
    transform: scale(1.05) !important;
    box-shadow: 8px 8px 0 black !important;
  }
  
  #homeInfoButton:hover img {
    filter: brightness(0) invert(1) !important;
  }
  
  /* Reset + Fertig auf dieselbe untere Linie setzen */
  #drawingActionButtons {
        position: fixed !important;
      
        bottom: 28px !important;
      
        left: calc(50% + 18vw) !important;
        transform: translateX(-50%) !important;
      
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
      
        gap: 48px !important;
      
        margin: 0 !important;
        z-index: 6000 !important;
  }
  
  /* Reset/Fertig optisch auf dieselbe Button-Höhe bringen */
  #drawingActionButtons #resetButton,
  #drawingActionButtons #lockButton {
    position: static !important;
  
    height: var(--bottom-button-size) !important;
    min-height: var(--bottom-button-size) !important;
  
    padding: 0 28px !important;
    margin: 0 !important;
  
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  
    background: #ff1fd0 !important;
    color: black !important;
  
    border: 2px solid black !important;
    border-radius: 999px !important;
  
    box-shadow: var(--bottom-button-shadow) !important;
  
    font-family: "MeineSchrift", sans-serif !important;
    font-size: 16px !important;
    font-weight: bold !important;
  
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  
    transform: none !important;
  }
  
  #drawingActionButtons #resetButton:hover,
  #drawingActionButtons #lockButton:hover {
    background: black !important;
    color: white !important;
    transform: scale(1.05) !important;
    box-shadow: 8px 8px 0 black !important;
  }

  /* ===== Startscreen 3D-Objekte ===== */

#startScreen {
    overflow: hidden !important;
  }
  
  #start3DField {
    position: absolute !important;
    inset: 0 !important;
  
    width: 100vw !important;
    height: 100vh !important;
  
    z-index: 1 !important;
  
    pointer-events: auto !important;
  }
  
  #start3DField canvas {
    width: 100% !important;
    height: 100% !important;
  
    display: block !important;
  
    pointer-events: auto !important;
  }
  
  #startButton {
    position: relative !important;
    z-index: 20 !important;
  }

  #startScreen {
    position: fixed !important;
    inset: 0 !important;
    overflow: hidden !important;
    z-index: 9999 !important;
  }
  
  #start3DField {
    position: absolute !important;
    inset: 0 !important;
  
    width: 100vw !important;
    height: 100vh !important;
  
    z-index: 1 !important;
    pointer-events: auto !important;
  }
  
  #start3DField canvas {
    position: absolute !important;
    inset: 0 !important;
  
    width: 100% !important;
    height: 100% !important;
  
    display: block !important;
    pointer-events: auto !important;
  }
  
  #startButton {
    position: relative !important;
    z-index: 20 !important;
  }

  /* ===== Downloadbutton Distribution Card ===== */

#saveConfirmationCard {
    position: relative !important;
    overflow: visible !important;
  }
  
  #downloadSavedLetterButton {
    position: absolute !important;
  
    right: 18px !important;
    bottom: 18px !important;
  
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  
    padding: 0 !important;
    margin: 0 !important;
  
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  
    background: white !important;
    color: black !important;
  
    border: 2px solid black !important;
    border-radius: 50% !important;
  
    box-shadow: 4px 4px 0 black !important;
  
    font-family: "MeineSchrift", sans-serif !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  
    text-transform: none !important;
    letter-spacing: 0 !important;
  
    cursor: pointer !important;
    z-index: 20 !important;
  }
  
  #downloadSavedLetterButton:hover {
    background: #ff1fd0 !important;
    color: black !important;
  
    transform: translate(-1px, -1px) !important;
    box-shadow: 5px 5px 0 black !important;
  }
  
  #downloadSavedLetterButton:active {
    transform: translate(2px, 2px) !important;
    box-shadow: 2px 2px 0 black !important;
  }

  /* ===== Text im rechten Fragezeichen-Infofeld ===== */

.infoPanel {
    font-family: "DeineSchrift", sans-serif !important;
  }
  
  .infoPanel p {
    font-family: "Futura" !important;
    font-size: 18px !important;
    line-height: 1.28 !important;
    font-weight: 500 !important;
    text-align: left !important;
  
    margin: 0 0 18px !important;
  }
  
  .infoPanel .infoHeadline {
    font-family: "Krungthep", sans-serif !important;
    color: #ff1fd0;
    font-size: 28px !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    text-align: left !important;
  
    margin-bottom: 22px !important;
  }
  
  .infoPanel .infoHeadline b {
    font-weight: 900 !important;
  }

  /* ==================================================
   Einheitliche X-Buttons für Panels
   NICHT für Formen im Drawing Panel
   ================================================== */

#closeAlphabetInfoButton,
#closeInfoAssistantButton,
#closeHomeInfoPanelButton,
#closeSaveConfirmationButton,
#closeShapeControlPanelButton {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;

  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 50% !important;

  box-shadow: 5px 5px 0 black !important;

  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 30px !important;
  font-weight: 400 !important;
  line-height: 1 !important;

  text-align: center !important;

  text-transform: none !important;
  letter-spacing: 0 !important;

  cursor: pointer !important;
  z-index: 9999 !important;
}

/* X optisch exakt mittig setzen */
#closeAlphabetInfoButton,
#closeInfoAssistantButton,
#closeHomeInfoPanelButton,
#closeSaveConfirmationButton,
#closeShapeControlPanelButton {
  padding-bottom: 0,65px !important;
}

/* Hover für alle Panel-X-Buttons gleich */
#closeAlphabetInfoButton:hover,
#closeInfoAssistantButton:hover,
#closeHomeInfoPanelButton:hover,
#closeSaveConfirmationButton:hover,
#closeShapeControlPanelButton:hover {
  background: black !important;
  color: white !important;

  transform: scale(1.06) !important;
  box-shadow: 7px 7px 0 black !important;
}

/* Klick-Zustand */
#closeAlphabetInfoButton:active,
#closeInfoAssistantButton:active,
#closeHomeInfoPanelButton:active,
#closeSaveConfirmationButton:active,
#closeShapeControlPanelButton:active {
  transform: translate(2px, 2px) scale(0.98) !important;
  box-shadow: 3px 3px 0 black !important;
}

#closeAlphabetInfoButton {
    position: absolute !important;
  
    top: -20px !important;
    right: -20px !important;
  
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  
    padding: 0 0 0,7px 0 !important;
    margin: 0 !important;
  
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  
    background: #ff1fd0 !important;
    color: black !important;
  
    border: 2px solid black !important;
    border-radius: 50% !important;
  
    box-shadow: 5px 5px 0 black !important;
  
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  
    text-align: center !important;
  
    text-transform: none !important;
    letter-spacing: 0 !important;
  
    cursor: pointer !important;
    z-index: 99999 !important;
  }

  /* ===== QR-Code Overlay in der Distribution Card ===== */

#qrDownloadOverlay {
  position: absolute;

  right: 18px;
  bottom: 18px;

  width: 160px;
  min-height: 190px;

  padding: 18px 14px 14px;

  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: white;
  border: 2px solid black;
  box-shadow: 6px 6px 0 black;

  z-index: 80;
}

#qrDownloadOverlay.is-open {
  display: flex;
}

#qrDownloadCode {
  width: 112px;
  height: 112px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: white;
}

#qrDownloadCode img,
#qrDownloadCode canvas {
  width: 112px;
  height: 112px;
  display: block;
}

#qrDownloadText {
  margin: 0;

  font-family: "Krungthep", sans-serif;
  font-size: 10px;
  line-height: 1.2;

  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;

  color: black;
}

#closeQRDownloadButton {
  position: absolute;

  top: -18px;
  right: -18px;

  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;

  padding: 0 0 3px 0;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #ff1fd0;
  color: black;

  border: 2px solid black;
  border-radius: 50%;

  box-shadow: 4px 4px 0 black;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;

  cursor: pointer;
}

#closeQRDownloadButton:hover {
  background: black;
  color: white;
}

  