/* public/css/ole.css – Board des „Ole, dein Ausbaumeister"-Moduls (Paket 1).
   Karten je Baublock, gruppiert in Gewerk-Spalten; Konflikt-Markierungen
   und Modal. Nutzt die globalen Variablen aus style.css/app.css. */

.ole-toolbar { display: flex; gap: .75rem; margin-bottom: 1rem; }

.ole-loading { color: var(--text-light); padding: 2rem 0; }

/* Gewerk-Spalten: horizontal scrollbar auf Mobile, Grid ab Desktop */
.ole-board__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    align-items: start;
}

.ole-column {
    background: var(--as-hellbeige);
    border-radius: var(--radius);
    padding: .75rem;
    min-height: 4rem;
}
.ole-column__title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--as-dunkelrot);
    margin: 0 0 .6rem;
}

/* Block-Karte */
.ole-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: .7rem .9rem;
    margin-bottom: .6rem;
    cursor: grab;
    border-left: 4px solid var(--as-braun);
}
.ole-card:active { cursor: grabbing; }
.ole-card--dragging { opacity: .4; }
.ole-card--conflict { border-left-color: #b91c1c; }
.ole-card--erledigt { opacity: .75; }
.ole-card--erledigt .ole-card__title { text-decoration: line-through; }
/* Coach-Sicht (Read-only): eigene zugeordnete Bloecke hervorgehoben */
.ole-card--mine { border-left-color: var(--as-rot, #CF3628); background: #FFF3CD; cursor: default; }

.ole-card__title { font-weight: 700; font-size: .95rem; display: block; }
.ole-card__meta {
    display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center;
    margin-top: .35rem; font-size: .78rem; color: var(--text-light);
}
.ole-card__deps { font-size: .78rem; color: var(--text-light); margin-top: .3rem; }
.ole-card__conflict {
    font-size: .78rem; color: #b91c1c; margin-top: .35rem;
    background: #FDECEC; border-radius: 5px; padding: .25rem .5rem;
}

/* Drop-Ziel-Markierung */
.ole-column--over { outline: 2px dashed var(--as-rot); outline-offset: -2px; }

/* Status-Badges (auf Basis der globalen .tag-Klassen) */
.ole-status--geplant  { background: var(--as-hellbeige); color: #5A4F48; }
.ole-status--aktiv    { background: #FDECC8; color: #9a6700; }
.ole-status--erledigt { background: #D3F0DD; color: #2d6a4f; }

/* Modal (<dialog>) */
.ole-modal {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    width: min(560px, 92vw);
}
.ole-modal::backdrop { background: rgba(0, 0, 0, .45); }
.ole-modal h3 { margin-top: 0; color: var(--as-braun-dark); }   /* vereinheitlicht mit .app-modal__head h3 (23.08.2026) */

/* Block-Modal (23.08.2026, Peter): verschiebbar (Kopfzeile = Griff, ole.js)
   + groessenveraenderbar; Sektions-Trenner; Deps-Wrap zugeklappt */
#ole-block-modal { resize: both; overflow: auto; max-width: 92vw; max-height: 88vh; }
#ole-block-modal h3 { cursor: move; user-select: none; }
.ole-sep { border: none; border-top: 1px solid var(--as-hellbeige); margin: .8rem 0; }
.ole-deps-wrap > summary { cursor: pointer; font-weight: 600; color: var(--as-braun-dark); font-size: .9rem; }
.ole-modal textarea {
    width: 100%; padding: .55rem .7rem; border: 1px solid var(--as-hellbeige);
    border-radius: var(--radius); font: inherit; background: #fff;
}
.ole-modal select[multiple] { min-height: 5.5rem; }

/* Material-Editor im Block-Modal (Paket 1b) */
.ole-materials { margin-bottom: .8rem; }
.ole-materials__title {
    display: block; font-weight: 700; font-size: .85rem;
    color: var(--as-braun-dark); margin-bottom: .4rem;
}
.ole-materials__title small { font-weight: 400; color: var(--text-light); }
.ole-materials__row {
    margin-bottom: .5rem;
}
.ole-materials__line {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr auto .7fr auto auto;
    gap: .35rem;
    align-items: center;
    margin-bottom: .35rem;
}
.ole-materials__line--meta {
    grid-template-columns: 1.4fr .7fr 1fr;
    margin-bottom: 0;
}
.ole-materials__row input[type=text], .ole-materials__row input[type=url],
.ole-materials__row select {
    width: 100%; padding: .4rem .55rem; border: 1px solid var(--as-hellbeige);
    border-radius: var(--radius); font: inherit; font-size: .85rem; background: #fff;
}
.ole-materials__line--meta input, .ole-materials__line--meta select {
    font-size: .8rem !important; color: var(--text-light);
}
.ole-mat-fetch {
    border: 1px solid var(--as-braun); background: none; color: var(--as-dunkelrot);
    border-radius: var(--radius); padding: .3rem .55rem; cursor: pointer;
    font-size: .8rem; white-space: nowrap;
}
.ole-mat-fetch:hover { background: var(--as-hellbeige); }
.ole-mat-inc { display: flex; align-items: center; gap: .15rem; font-size: .8rem; color: var(--text-light); }
.ole-mat-del {
    border: none; background: none; color: #b91c1c; cursor: pointer;
    font-size: .9rem; padding: .2rem .35rem;
}
.ole-materials__add {
    border: 1px dashed var(--as-braun); background: none; color: var(--as-dunkelrot);
    border-radius: var(--radius); padding: .3rem .8rem; cursor: pointer; font-size: .85rem;
}
.ole-materials__sum { font-size: .85rem; color: var(--as-dunkelrot); font-weight: 700; margin-top: .4rem; }
@media (max-width: 640px) {
    .ole-materials__line { grid-template-columns: 1fr 1fr; }
    .ole-materials__line--meta { grid-template-columns: 1fr 1fr 1fr; }
    .ole-mat-price { grid-column: 1; }
}

/* URL-Fetch (Titel/Preis nachladen): Zeile waehrend des Requests sperren */
.ole-materials__row.is-loading { opacity: .5; pointer-events: none; }

/* Beschreibungs-Vorschlag (Academy-Suche + LLM) */
.ole-suggest { display: flex; align-items: baseline; gap: .6rem; margin: -.4rem 0 .6rem; flex-wrap: wrap; }
.ole-suggest__btn {
    border: 1px solid var(--as-braun); background: none; color: var(--as-dunkelrot);
    border-radius: var(--radius); padding: .3rem .7rem; cursor: pointer; font-size: .8rem;
}
.ole-suggest__btn:hover { background: var(--as-hellbeige); }
.ole-suggest__btn:disabled { opacity: .5; cursor: wait; }
.ole-suggest__info { font-size: .78rem; color: var(--text-light); }
.ole-suggest__info a { color: var(--as-rot); }

/* Chat mit Ole (Paket 2+3) */
.ole-chat { margin-top: 2rem; max-width: 860px; }
.ole-chat__log {
    border: 1px solid var(--as-hellbeige); border-radius: var(--radius);
    background: #fff; padding: .8rem; min-height: 8rem; max-height: 22rem;
    overflow-y: auto; display: flex; flex-direction: column; gap: .6rem;
}
.ole-chat__msg { max-width: 85%; }
.ole-chat__msg p { margin: .15rem 0 0; font-size: .9rem; line-height: 1.45; }
.ole-chat__who { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-light); }
.ole-chat__avatar { width: 32px; height: 32px; border-radius: 50%; vertical-align: middle; margin-right: .4rem; flex: 0 0 auto; }
.ole-chat__msg--assistant { align-self: flex-start; background: var(--as-hellbeige); border-radius: var(--radius); padding: .5rem .7rem; }
.ole-chat__msg--user { align-self: flex-end; background: var(--as-dunkelrot); color: #fff; border-radius: var(--radius); padding: .5rem .7rem; }
.ole-chat__msg--user .ole-chat__who { color: rgba(255,255,255,.75); }
.ole-chat__form { display: flex; gap: .5rem; margin-top: .6rem; }
.ole-chat__form input {
    flex: 1; padding: .55rem .7rem; border: 1px solid var(--as-hellbeige);
    border-radius: var(--radius); font: inherit; background: #fff;
}

/* Arbeitsnachweis (Paket 6) */
.ole-log { border-top: 1px dashed var(--as-hellbeige); padding-top: .6rem; margin-top: .4rem; }
.ole-log__row { font-size: .85rem; padding: .2rem 0; display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; }
.ole-log__row small { color: var(--text-light); }
.ole-log__empty { font-size: .8rem; color: var(--text-light); }
.ole-log__form { display: flex; gap: .4rem; margin-top: .4rem; flex-wrap: wrap; }
.ole-log__form input {
    padding: .4rem .55rem; border: 1px solid var(--as-hellbeige); border-radius: var(--radius);
    font: inherit; font-size: .85rem; background: #fff;
}
.ole-log__form input:first-child { width: 8rem; }
.ole-log__form input:nth-child(2) { flex: 1; min-width: 10rem; }

/* Kalender (Paket 4) */
.ole-cal { margin-top: 2rem; }
.ole-cal__nav { display: flex; align-items: center; gap: 1rem; margin: .5rem 0; }
/* Drop-Hover beim Ziehen ueber die Monats-Buttons (ole-cal.js) */
.ole-cal__nav button.is-over { outline: 2px dashed var(--as-braun); outline-offset: 2px; }
.ole-cal__nav strong { min-width: 10rem; text-align: center; }
.ole-cal__unscheduled { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.ole-cal__unlabel { font-size: .8rem; font-weight: 700; color: var(--as-braun-dark); }
.ole-cal__empty { font-size: .8rem; color: var(--text-light); }
.ole-cal__row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ole-cal__row--cells { display: block; }
.ole-cal__row--cells::after { content: ''; display: block; clear: both; }
.ole-cal__dayname { font-size: .75rem; font-weight: 700; text-align: center; color: var(--text-light); padding: .2rem 0; }
.ole-cal__day {
    float: left; width: calc(100% / 7); min-height: 5.2rem; border: 1px solid var(--as-hellbeige);
    background: #fff; padding: .25rem; box-sizing: border-box;
}
.ole-cal__day--empty { background: transparent; border-color: transparent; }
.ole-cal__day.is-over { background: var(--as-hellbeige); }
.ole-cal__daynum { font-size: .72rem; color: var(--text-light); display: block; }
.ole-cal__chip {
    display: inline-flex; align-items: center; gap: .2rem; cursor: grab;
    background: var(--as-braun); color: #fff; border-radius: 4px;
    font-size: .72rem; padding: .12rem .35rem; margin: .1rem .1rem 0 0;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Farbe kommt inline aus der Gewerk-Palette (ole-cal.js); der Status steuert
   nur noch Deckkraft/Markierung, damit die Gewerk-Farbe erhalten bleibt. */
.ole-cal__chip--aktiv { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.ole-cal__chip--erledigt { opacity: .5; text-decoration: line-through; }
/* Mehrtaegige Bloecke als durchgehender Balken: Segmente fuellen die Tages-
   zelle komplett, Ecken nur am Anfang/Ende gerundet (ole-cal.js, Paket 4a). */
.ole-cal__chip--seg { display: flex; width: 100%; margin: .1rem 0 0; border-radius: 0; }
.ole-cal__chip--start { border-radius: 4px 0 0 4px; }
.ole-cal__chip--end { border-radius: 0 4px 4px 0; }
.ole-cal__chip--start.ole-cal__chip--end { border-radius: 4px; }
.ole-cal__un { border: none; background: none; color: rgba(255,255,255,.85); cursor: pointer; font-size: .65rem; padding: 0 .1rem; }
.ole-cal__legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .5rem; font-size: .78rem; color: var(--text-light); }
.ole-cal__dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; vertical-align: -.05rem; }
.ole-cal__hint { font-size: .78rem; color: var(--text-light); margin-top: .4rem; }

/* Standard-Plan-Dialog (ole.js) */
.ole-standard__list { display: grid; gap: .35rem; max-height: 22rem; overflow-y: auto; margin: .6rem 0 1rem; }
.ole-standard__row {
    display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem;
    border: 1px solid var(--as-hellbeige); border-radius: var(--radius); background: #fff;
}
.ole-standard__row input { flex: none; }
.ole-standard__title { font-weight: 600; flex: 1; }
.ole-standard__row small { color: var(--text-light); flex: none; }

/* Abhaengigkeiten: Checkbox-Liste im Modal + Schnell-Entfernen an der Karte */
.ole-deps { display: grid; gap: .3rem; max-height: 10rem; overflow-y: auto; margin: .25rem 0 .8rem; }
.ole-deps__row {
    display: flex; align-items: center; gap: .5rem; padding: .3rem .6rem;
    border: 1px solid var(--as-hellbeige); border-radius: var(--radius); background: #fff; font-size: .9rem;
}
.ole-deps__row input { flex: none; }
.ole-deps__empty { color: var(--text-light); font-size: .85rem; }
.ole-card__dep {
    display: inline-flex; align-items: center; gap: .15rem;
    background: var(--as-hellbeige); border-radius: 4px; padding: .05rem .3rem;
}
.ole-card__dep-del { color: var(--as-braun-dark); }

/* Story-Bruecke (Paket 6 Teil 2) */
.ole-story { margin-top: .8rem; }
.ole-story__linked { font-size: .9rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.ole-story__linked a { color: var(--as-rot); font-weight: 600; }
.ole-card__story { color: var(--as-rot); font-weight: 600; }
@media (max-width: 640px) {
    .ole-cal__day { min-height: 3.6rem; }
    .ole-cal__chip { font-size: .62rem; }
}

/* Zeichnungen-Liste im Block-Dialog (Board, 08/2026) — Muster: Galerie der
   Offenen Punkte (baumeister-punkte.php), hier als eigene Klasse. */
.ole-block-drawings { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .6rem; }
.ole-block-drawings__item { text-align: center; max-width: 110px; cursor: pointer; }
.ole-block-drawings__item img { width: 100px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--as-hellbeige); background: #fff; }
.ole-block-drawings__item:hover img { border-color: var(--as-dunkelrot); }
.ole-block-drawings__ph { display: inline-flex; width: 100px; height: 76px; border-radius: 8px; border: 1px dashed var(--as-hellbeige); align-items: center; justify-content: center; font-size: 1.5rem; background: #fff; }
.ole-block-drawings__cap { font-size: .72rem; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ole-drawing-add { margin-top: .6rem; }   /* Abstand zur Thumb-Liste darueber */
