/* Fixed row geometry; expanded contents float above rows instead of resizing them. */
.gc-stable-grid .tabulator-row .tabulator-cell{height:40px;max-height:40px;box-sizing:border-box}
.gc-stable-grid .tabulator-row:has(.tabulator-editing),.gc-stable-grid .tabulator-row:has(.dg-cell-text-selectable){z-index:25;overflow:visible}
.gc-stable-grid .tabulator-cell.tabulator-editing,.gc-stable-grid .tabulator-cell.dg-cell-text-selectable{overflow:visible!important;z-index:26}
.gc-stable-grid .tabulator-cell.dg-cell-text-selectable :is(.dg-clamp-cell,.dg-clip-cell){position:absolute;left:0;top:0;min-width:220px;width:max-content;max-width:min(380px,80vw);max-height:250px!important;overflow:auto!important;white-space:pre-wrap!important;overflow-wrap:anywhere;display:block!important;padding:10px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-gold);border-radius:6px;box-shadow:var(--ui-shadow-raised);text-align:left;line-height:1.5;z-index:27}
.gc-stable-grid .tabulator-cell:not(.dg-cell-text-selectable) :is(.dg-clamp-cell,.dg-clip-cell){transform:none!important}
.gc-stable-grid .tabulator-editing>:is(.gc-editor,.pl-grid-editor,.pl-textarea-editor,textarea){position:absolute;left:0;top:0;z-index:30;box-sizing:border-box}
.gc-editor{background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-gold);border-radius:6px;padding:6px;box-shadow:var(--ui-shadow-raised);font:inherit}
.gc-text-editor{width:320px!important;max-width:80vw;min-width:200px!important;min-height:120px!important;height:160px!important;resize:both;text-align:left!important;line-height:1.5}
.gc-date-control{display:flex;gap:6px;min-width:210px;width:230px;max-width:80vw;align-items:center}
.gc-date-control>input[type=text]{min-width:0;flex:1;width:160px!important;font:inherit;min-height:36px;padding:6px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:4px}
.gc-date-control>.gc-date-picker{flex:0 0 36px;width:36px!important;min-width:36px!important;height:36px;border:1px solid var(--ui-gold);border-radius:5px;color:transparent;background:var(--ui-muted-surface);padding:4px}
.gc-date-picker::-webkit-datetime-edit{display:none}.gc-date-picker::-webkit-calendar-picker-indicator{margin:auto;cursor:pointer;opacity:1}
.gc-multi-control{min-width:260px;width:300px;max-width:80vw;background:var(--ui-surface);color:var(--ui-text);padding:8px;border:1px solid var(--ui-border);border-radius:6px}
.gc-multi-control>input{width:100%;padding:8px;min-height:36px;border:1px solid var(--ui-border);background:var(--ui-surface);color:var(--ui-text)}
.gc-multi-options{max-height:220px;overflow:auto}.gc-multi-options label{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;padding:8px;cursor:pointer;font-size:12px;white-space:normal}
.gc-multi-options input[type=checkbox]{width:17px!important;min-width:17px;min-height:17px!important;height:17px!important;accent-color:var(--ui-gold)}
#preparation-root .pl-status{height:42px;min-height:42px;overflow:auto;margin:6px 0;line-height:20px}
#preparation-grid .tabulator-row[data-bedeni-color=MAVI] .tabulator-cell{background:#dbeafe;color:#000}
#preparation-grid .tabulator-row[data-bedeni-color=YESIL] .tabulator-cell{background:#dcfce7;color:#000}
#preparation-grid .tabulator-row[data-bedeni-color=SARI] .tabulator-cell{background:#fef3c7;color:#000}
#preparation-grid .tabulator-row[data-bedeni-color=PEMBE] .tabulator-cell{background:#fce7f3;color:#000}
html[data-theme=dark] #preparation-grid .tabulator-row[data-bedeni-color=MAVI] .tabulator-cell{background:#19385e;color:#fff}
html[data-theme=dark] #preparation-grid .tabulator-row[data-bedeni-color=YESIL] .tabulator-cell{background:#174332;color:#fff}
html[data-theme=dark] #preparation-grid .tabulator-row[data-bedeni-color=SARI] .tabulator-cell{background:#4c3a12;color:#fff}
html[data-theme=dark] #preparation-grid .tabulator-row[data-bedeni-color=PEMBE] .tabulator-cell{background:#51243f;color:#fff}
#preparation-grid.gc-stable-grid .pl-grid-editor{background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-gold)}

/* Opt-in reading behavior: short/empty cells keep their original geometry. */
.gc-comfort-grid .gc-reading-cell,.gc-comfort-grid .gc-reading-cell :is(.dg-clamp-cell,.dg-clip-cell,.dg-lookup-cell span:first-child){user-select:text!important;-webkit-user-select:text!important;cursor:text}
.gc-comfort-grid .tabulator-row:has(.gc-text-expanded){z-index:25;overflow:visible}
.gc-comfort-grid .tabulator-cell:has(.gc-text-expanded){overflow:visible!important;z-index:26}
.gc-stable-grid.gc-comfort-grid .tabulator-cell.gc-reading-cell .gc-text-expanded{box-sizing:border-box;position:absolute;left:0;top:0;min-width:0;width:max-content;max-width:min(380px,80vw);max-height:240px!important;overflow:auto!important;white-space:pre-wrap!important;overflow-wrap:anywhere;display:block!important;-webkit-line-clamp:unset;line-clamp:unset;padding:6px 8px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-gold);border-radius:4px;box-shadow:var(--ui-shadow-raised);text-align:left;line-height:1.4;z-index:27;transform:var(--gc-reading-transform,none)!important}
.gc-comfort-grid .gc-text-editor{width:var(--gc-editor-width,100%)!important;min-width:0!important;max-width:80vw;height:var(--gc-editor-height,40px)!important;min-height:40px!important;max-height:240px;resize:none;overflow:auto}

/* Cell-type affordances. Marks sit bottom-right because the amber cell-note
   triangle owns the top-right corner, and no background is tinted because the
   row colours already carry meaning there. */
.gc-kind-mark{margin-left:3px;font-size:.8em;opacity:.7;letter-spacing:-1px;white-space:nowrap}
.gc-kind-hint{opacity:.4;font-style:italic;font-size:.9em;pointer-events:none;user-select:none}
.tabulator-cell.gc-kind::after{position:absolute;right:2px;bottom:0;font-size:9px;line-height:1;opacity:0;pointer-events:none;transition:opacity .12s ease}
.tabulator-cell.gc-kind-date::after{content:"\1F4C5"}
.tabulator-cell.gc-kind-choice::after{content:"\25BE";font-size:11px}
.tabulator-cell.gc-kind-multi::after{content:"\2630\25BE";letter-spacing:-1px}
@media (hover:hover) and (pointer:fine){
  .tabulator-cell.gc-kind:hover::after{opacity:.6}
  .tabulator-cell.gc-kind:hover{cursor:pointer}
}
.tabulator-cell.gc-kind.tabulator-editing::after{content:none}
.gc-tooltip-text{display:block;white-space:pre-wrap;overflow-wrap:anywhere;max-width:min(460px,80vw)}
