/*! InnoHub Sticky UI v2.0 — Styles
 *  Das Feld ist komplett inline gestylt, deshalb steht hier viel !important.
 *  Ohne das gewinnt immer das style-Attribut aus dem Renderer.
 */

:root {
  --ihb-ink:      #221F1A;
  --ihb-ink-soft: #6B6459;
  --ihb-line:     #E6E2DA;
  --ihb-focus:    #2F6BFF;
  --ihb-shadow:   rgba(34, 31, 26, .30);
  --ihb-font:     ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------- Rahmen -- */

.ihb-board {
  position: relative;
  border: 1px solid var(--ihb-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  overflow: hidden !important;
  font-family: var(--ihb-font);
}

/* -------------------------------------------------------------- Leiste -- */

.ihb-board .ihb-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid var(--ihb-line) !important;
  background: #FCFBF9 !important;
}

/* Gruppen auflösen, damit alle Buttons eine Reihe bilden */
.ihb-board .ihb-bar__grp,
.ihb-board .ihb-bar__grp > div { display: contents !important; }

.ihb-board .ihb-gone { display: none !important; }

.ihb-board button.ihb-tool {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  height: 38px !important;
  min-height: 0 !important;
  padding: 0 14px !important;
  font: 600 14px/1 var(--ihb-font) !important;
  letter-spacing: -.01em !important;
  color: var(--ihb-ink) !important;
  background: #fff !important;
  border: 1px solid var(--ihb-line) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  text-transform: none !important;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .12s ease;
}
.ihb-board button.ihb-tool:hover { background: #F5F2EC !important; border-color: #D8D2C6 !important; }
.ihb-board button.ihb-tool:active { transform: scale(.97); }
.ihb-board button.ihb-tool .material-symbols-outlined { font-size: 19px !important; }
.ihb-board button.ihb-tool svg { width: 18px; height: 18px; }

.ihb-board button.ihb-tool--primary {
  color: #fff !important;
  background: var(--ihb-ink) !important;
  border-color: var(--ihb-ink) !important;
}
.ihb-board button.ihb-tool--primary:hover { background: #3A342C !important; border-color: #3A342C !important; }

.ihb-board button.ihb-tool--danger:hover { color: #A32B1E !important; border-color: #E3BDB7 !important; background: #FBF2F0 !important; }

/* Vollbild rechts absetzen */
.ihb-board button.ihb-tool--fs { margin-left: auto !important; }

/* ------------------------------------------------------------- Fläche -- */

.ihb-board .ihb-board__scroll {
  background-color: #F6F5F2 !important;
  background-image:
    linear-gradient(rgba(34, 31, 26, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 31, 26, .055) 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
  scrollbar-width: thin;
}

/* ----------------------------------------------------------- Vollbild -- */

.ihb-board.ihb-fs {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #EDEBE6 !important;
}
.ihb-board.ihb-fs .ihb-bar {
  border-bottom: 1px solid rgba(34, 31, 26, .10) !important;
  background: rgba(255, 255, 255, .86) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding-right: 62px !important;   /* Platz für den Schließen-Knopf */
}
.ihb-board.ihb-fs .ihb-board__scroll {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
}
.ihb-board .ihb-board__sizer { transform-origin: center center; }

html.ihb-fs-lock { overflow: hidden !important; }

.ihb-fs-close { display: none !important; }
.ihb-board.ihb-fs > .ihb-fs-close {
  position: absolute;
  top: 11px; right: 12px;
  z-index: 5;
  display: grid !important;
  place-items: center;
  width: 38px; height: 38px;
  padding: 0;
  color: var(--ihb-ink);
  background: #fff;
  border: 1px solid var(--ihb-line);
  border-radius: 999px;
  cursor: pointer;
}
.ihb-board.ihb-fs > .ihb-fs-close:hover { background: #F5F2EC; }
.ihb-fs-close svg { width: 18px; height: 18px; }

/* -------------------------------------------------------------- Popup -- */

.ihb-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--ihb-ink);
  font-family: var(--ihb-font);
  box-shadow: 0 40px 80px -30px rgba(34, 31, 26, .6), 0 0 0 1px rgba(34, 31, 26, .08);
  animation: ihb-pop .18s cubic-bezier(.2, .8, .3, 1.1);
}
.ihb-dialog::backdrop {
  background: rgba(34, 31, 26, .42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
@keyframes ihb-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }

.ihb-dialog__inner { padding: 14px; }
.ihb-dialog__head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 12px 6px; }
.ihb-dialog__title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ihb-dialog__x {
  margin-left: auto;
  display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0;
  color: var(--ihb-ink-soft);
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.ihb-dialog__x:hover { background: rgba(34, 31, 26, .07); color: var(--ihb-ink); }
.ihb-dialog__x svg { width: 17px; height: 17px; }

/* Der Editor ist das Post-it selbst, inklusive Klebestreifen. */
.ihb-dialog__paper {
  position: relative;
  padding: 22px 16px 16px;
  background: linear-gradient(158deg, var(--c-t, #F8E9A0) 0%, var(--c, #F4DE7A) 46%, var(--c-b, #E7D06A) 100%);
  box-shadow: 0 8px 20px -12px var(--ihb-shadow);
  transition: background .18s ease;
}
.ihb-dialog__paper::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 22%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.ihb-dialog__text {
  position: relative;
  display: block;
  width: 100%; height: 168px;
  padding: 0; margin: 0;
  font: 500 20px/1.28 var(--ihb-font);
  letter-spacing: -.012em;
  color: var(--ihb-ink);
  background: transparent;
  border: 0;
  resize: none;
}
.ihb-dialog__text:focus { outline: none; }
.ihb-dialog__text::placeholder { color: rgba(34, 31, 26, .38); }

.ihb-dialog__colors { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 2px 2px; }

.ihb-swatch {
  width: 34px; height: 34px; padding: 0;
  background: var(--c);
  border: 1px solid var(--c-d);
  border-radius: 6px;
  cursor: pointer;
  transition: transform .14s cubic-bezier(.2, .8, .3, 1.4), box-shadow .18s ease;
}
.ihb-swatch:hover { transform: translateY(-2px) rotate(-4deg); }
.ihb-swatch.is-active { transform: translateY(-2px); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ihb-ink); }

.ihb-dialog__foot { display: flex; align-items: center; gap: 8px; padding: 14px 0 2px; }
.ihb-dialog__spacer { flex: 1; }

.ihb-btn2 {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 16px;
  font: 600 14px/1 var(--ihb-font);
  border: 1px solid transparent; border-radius: 9px;
  cursor: pointer;
  transition: background .16s ease, transform .12s ease, color .16s ease;
}
.ihb-btn2:active { transform: scale(.97); }
.ihb-btn2 svg { width: 16px; height: 16px; }
.ihb-btn2--primary { color: #fff; background: var(--ihb-ink); }
.ihb-btn2--primary:hover { background: #3A342C; }
.ihb-btn2--ghost { color: var(--ihb-ink-soft); background: transparent; }
.ihb-btn2--ghost:hover { background: rgba(34, 31, 26, .07); color: var(--ihb-ink); }
.ihb-btn2--danger { padding: 0 12px; }
.ihb-btn2--danger:hover { color: #A32B1E; background: rgba(163, 43, 30, .09); }
.ihb-btn2[hidden] { display: none; }

.ihb-dialog :focus-visible,
.ihb-board :focus-visible { outline: 3px solid var(--ihb-focus); outline-offset: 2px; }

.ihb-sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

@media (max-width: 640px) {
  .ihb-board button.ihb-tool { padding: 0 11px !important; font-size: 13px !important; }
  .ihb-board button.ihb-tool--fs { margin-left: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ihb-dialog, .ihb-dialog *, .ihb-board * { animation: none !important; transition: none !important; }
}
