/* Grundlayout */
.lb-widget { margin: 0; padding: 0; font-family: inherit; }
.lb-widget__header {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .35rem;
  cursor: pointer;
}
.lb-widget__header:hover { outline: 2px solid rgba(0,0,0,.12); outline-offset: 6px; border-radius: 8px; }
.lb-icon { width: 22px; height: 22px; object-fit: contain; }
.lb-icon-emoji { font-size: 20px; line-height: 1; }
.lb-widget__title { margin: 0; padding: 0; } /* Theme-H3 übernimmt den Rest */

.lb-list { display: flex; flex-direction: column; gap: .45rem; }
.lb-empty { opacity: .65; font-style: italic; }

/* Hover-Markierung */
.lb-item { position: relative; }
.lb-item:hover { outline: 2px solid rgba(0,0,0,.12); outline-offset: 6px; border-radius: 10px; cursor: pointer; }

/* Inputs: 2 Spalten */
.lb-input {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: stretch;
  border-radius: 10px;
  padding: 0;
}
.lb-input__time{
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  border-right: 6px solid #999;
  padding: .55rem .35rem;
}
.lb-input__body{
  padding: .55rem .65rem;
}
.lb-input__topic{
  font-weight: 800;
  margin-bottom: .25rem;
}
.lb-input__meta{
  font-size: .92rem;
  font-style: italic;
  opacity: .95;
}

/* Marker-Optik nur für Thema (Textmarker) */
.lb-marker{
  padding: 0 .18em;
  border-radius: .2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background: linear-gradient(transparent 55%, rgba(0,0,0,.08) 55%);
}
.lb-marker--deutsch{
  background: linear-gradient(transparent 55%, #ffd6d6 55%);
}
.lb-marker--englisch{
  background: linear-gradient(transparent 55%, #fff1b8 55%);
}
.lb-marker--mathe{
  background: linear-gradient(transparent 55%, #d9ecff 55%);
}

/* Input-Status Rahmen */
.lb-input.is-soon { outline: 3px solid rgba(0,0,0,.22); outline-offset: 4px; animation: lbPulse 1.1s ease-in-out infinite; }
.lb-input.is-live { outline: 3px solid rgba(0,0,0,.35); outline-offset: 4px; animation: none; }

@keyframes lbPulse {
  0% { outline-color: rgba(0,0,0,.12); }
  50% { outline-color: rgba(0,0,0,.45); }
  100% { outline-color: rgba(0,0,0,.12); }
}

/* Fristen/Termine */
.lb-frist, .lb-termin { padding: .5rem .65rem; border-radius: 10px; }
.lb-frist__row, .lb-termin__row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: .6rem;
  align-items: baseline;
}
.lb-frist__date, .lb-termin__date { font-weight: 700; }
.lb-frist__hint, .lb-termin__hint { margin-top: .25rem; opacity: .9; }
.lb-pill{
  display: inline-block;
  padding: .15rem .45rem;
  border-radius: 999px;
  font-size: .8rem;
  color: #fff;
  white-space: nowrap;
}

/* Schultermine als Bullets */
.lb-bullets { margin: 0; padding-left: 1.2rem; }
.lb-bullet { margin: .35rem 0; }
.lb-bullet__hint { margin-top: .2rem; opacity: .9; }

/* Gruppenräume */
.lb-gr-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.lb-gr-cell{
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  padding: .6rem .2rem;
  border-radius: 12px;
}
.lb-gr-lamp{
  width: 26px; height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.18);
  background: #b00020; /* default rot */
  cursor: pointer;
}
.lb-gr-lamp.is-open { background: #1faa00; }
.lb-gr-lamp.is-closed { background: #b00020; }
.lb-gr-label { font-weight: 800; }
.lb-gr-teacher { font-size: .92rem; opacity: .95; text-align: center; }

/* Modal */
.lb-modal-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.lb-modal{
  width: min(720px, 92vw);
  border-radius: 14px;
  padding: 14px;
  background: #1f4db8; /* blau */
  color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.lb-modal h4{ margin: 0 0 .6rem 0; }
.lb-form{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}
.lb-form .full{ grid-column: 1 / -1; }
.lb-form label{ font-size: .9rem; opacity: .95; display:block; margin-bottom:.2rem; }
.lb-form input, .lb-form select, .lb-form textarea{
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: .55rem .6rem;
}
.lb-form textarea{ min-height: 110px; }

.lb-modal-actions{
  display:flex; gap:.6rem; justify-content:flex-end;
  margin-top: .8rem;
}
.lb-btn{
  border: none;
  padding: .55rem .9rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}
.lb-btn.save{ background:#1faa00; color:#fff; }
.lb-btn.cancel{ background:#ffd000; color:#1b1b1b; }
.lb-btn.delete{ background:#b00020; color:#fff; }

/* Vollbild Button */
.lb-fullscreen-btn{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 99998;
  border: none;
  border-radius: 999px;
  padding: .65rem .9rem;
  font-weight: 800;
  cursor: pointer;
  background: rgba(0,0,0,.75);
  color: #fff;
}
