
/*
 * Scribble.rs – hoffmeister.li
 * Monochromes Theme
 *
 * Grau: Hintergrund, Schrift, Buttons, Menüs,
 *       Formulare, Dialoge und Stiftgrößenauswahl
 *
 * Original: Logo, Malpalette, Canvas, Zeichnung
 */

/* =========================================
   1. Farben und globale Einstellungen
   ========================================= */

:root {
  --pane-background: #e5e5e5;
  --component-base-color: #f7f7f7;
  --component-hover-background: #c9c9c9 !important;
  --component-hover-lighter-background: #e0e0e0 !important;
  --component-focus-background: #bcbcbc !important;
  --component-active-background: #a6a6a6 !important;

  color: #292929;
  color-scheme: light;
  accent-color: #747474;
}

/* =========================================
   2. Hintergrund
   ========================================= */

body,
body::backdrop,
body:fullscreen {
  background: linear-gradient(
    105deg,
    #414141 0%,
    #666666 50%,
    #8b8b8b 100%
  ) !important;
}

/* Originales Hintergrundbild in Graustufen */

body::before {
  background: var(--scribble-background) repeat !important;
  background-size: 400px 400px !important;
  opacity: 0.35;
  filter: grayscale(100%);
  pointer-events: none;
  z-index: -1;
}

/* =========================================
   3. Schrift und allgemeine Elemente
   ========================================= */

h1,
h2,
.dialog-title {
  color: #ededed !important;
}

.home-choice h1,
.home-choice h2,
.center-dialog h1,
.center-dialog h2,
.center-dialog .dialog-title {
  color: #343434 !important;
}

a:link,
a:visited {
  color: inherit;
}

footer {
  background-color: #454545;
  color: #f5f5f5;
}

/* =========================================
   4. Startseite und Lobby-Auswahl
   ========================================= */

.home-choice {
  background-color: var(--pane-background) !important;
  color: #292929;
}

.lobby-list-item {
  background-color: #f6f6f6 !important;
  border-color: #cfcfcf;
}

.lobby-list-item:hover {
  background-color: #e6e6e6 !important;
}

.lobby-list-item-info-pair {
  background-color: #e3e3e3 !important;
  color: #333333;
}

.custom-tag {
  background-color: #d8d8d8 !important;
  color: #444444 !important;
}

.join-button {
  background-color: #626262 !important;
  color: #ffffff !important;
}

.join-button:hover {
  background-color: #4b4b4b !important;
}

.lobby-create-errors {
  background-color: #c7c7c7 !important;
  color: #272727;
}

/* =========================================
   5. Formulare und Eingabefelder
   ========================================= */

/* Farb- und Zeichenwerkzeug-Controls ausnehmen */

input:not([type="color"]):not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  color: #292929 !important;
  border-color: #888888 !important;
}

input:not([type="color"]):not([type="radio"]):not([type="checkbox"]):is(:hover, :focus, :active),
select:is(:hover, :focus, :active),
textarea:is(:hover, :focus, :active) {
  background-color: #d0d0d0 !important;
  color: #292929 !important;
  border-color: #888888 !important;
  outline-color: #747474;
  box-shadow: none !important;
}

select option,
select option:checked {
  background-color: #d0d0d0;
  color: #292929;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #747474;
}

/* =========================================
   6. Buttons und Interaktionen
   ========================================= */

/* Malpalette und Canvas-Buttons ausschließen */

button:not(.color-button):not(.canvas-button):not(.header-button) {
  color: #292929;
}

button:not(.color-button):not(.canvas-button):not(.header-button):hover {
  background-color: var(--component-hover-background);
}

button:not(.color-button):not(.canvas-button):not(.header-button):focus {
  background-color: var(--component-focus-background);
}

button:not(.color-button):not(.canvas-button):not(.header-button):active {
  background-color: var(--component-active-background);
}

/* Rosa Highlights gezielt überschreiben */

.create-button:is(:hover, :focus, :active),
#lobby-create button:is(:hover, :focus),
.center-dialog .dialog-button:is(:hover, :focus, :active),
#word-button-container button:is(:hover, :focus, :active),
.button-bar button:is(:hover, :focus, :active),
#menu-button:is(:hover, :focus, :active),
#menu .menu-item:is(:hover, :focus, :active) {
  background-color: #bcbcbc !important;
  color: #292929 !important;
}

/* =========================================
   7. Spiel-Lobby
   ========================================= */

#lobby-header > *,
#menu-button-container,
#word-container,
.player,
#message-container {
  background-color: #f1f1f1 !important;
  color: #292929;
}

#message-input {
  background-color: #f7f7f7;
}

.message:nth-child(2n) {
  background-color: #dedede !important;
}

#menu {
  background-color: #ededed;
  color: #292929;
  border-color: #aaaaaa;
}

.gameover-scoreboard-entry {
  background-color: #eeeeee !important;
}

/* =========================================
   8. Wortauswahl und Statusanzeigen
   ========================================= */

#word-choices button:is(:hover, :focus, :active),
#word-choices button.selected,
.word-choice:is(:hover, :focus, :active),
.word-choice.selected {
  background-color: #bcbcbc !important;
  color: #292929 !important;
  border-color: #999999 !important;
}

.ready-check-box:has(input[type="checkbox"]:checked) {
  background-color: #bdbdbd !important;
}

.player-done {
  background-color: #b2b2b2 !important;
}

.player-ready {
  background-color: #d1d1d1 !important;
}

.correct-guess-message,
.correct-guess-message-other-player,
.non-guessing-player-message,
.close-guess-message,
.system-message {
  color: #565656 !important;
}

.hint-revealed {
  border-bottom-color: #666666 !important;
}

/* =========================================
   9. Stiftgrößen-Auswahl
   ========================================= */

/* Nur Auswahl-Hintergrund ändern,
   nicht Stiftpunkte oder Malfarben */

.line-width-button-content:hover,
.line-width-button:checked + .line-width-button-content {
  background-color: #bcbcbc !important;
}

.line-width-button:focus-visible + .line-width-button-content {
  outline: 2px solid #5c5c5c;
  outline-offset: 2px;
}

/* =========================================
   10. Dialoge und Hilfe-Fenster
   ========================================= */

.center-dialog {
  background-color: #dedede !important;
  color: #292929;
}

/* Hilfe-Dialog breiter darstellen */

#help-dialog {
  width: min(36rem, 80%) !important;
  max-width: 80% !important;
  box-sizing: border-box;
}

/* =========================================
   11. Fokus und Barrierefreiheit
   ========================================= */

input:not([type="color"]):focus-visible,
select:focus-visible,
textarea:focus-visible,
button:not(.color-button):not(.canvas-button):focus-visible {
  outline: 2px solid #747474;
  outline-offset: 2px;
}

/* =========================================
   12. Geschützte Originalelemente
   ========================================= */

/*
 * Bewusst keine Farbfilter auf:
 *
 * #logo
 * #drawing-board
 * #toolbox .color-button
 * canvas
 * Zeichenwerkzeuge und Farbmuster
 *
 * Keine globalen grayscale-Filter auf
 * body oder #app anwenden.
 */
