/* 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)}

/* Shared list profile. The protected Maddi grid does not opt into this class. */
.gc-standard-grid.tabulator{font-size:12px}
.gc-standard-grid .tabulator-row .tabulator-cell{height:40px;max-height:40px;font-family:Calibri,"Segoe UI",Arial,sans-serif;line-height:1.18}
.gc-standard-grid .tabulator-header .tabulator-col-title{white-space:normal}
.gc-standard-grid .tabulator-header .gc-date-filter{display:flex;gap:2px;min-width:0;width:100%;max-width:100%;padding:0}
.gc-standard-grid .tabulator-header .gc-date-filter>input[type=text]{flex:1;width:0!important;min-width:0;height:24px;min-height:24px;padding:2px 3px;font-size:11px;font-weight:400}
.gc-standard-grid .tabulator-header .gc-date-filter>.gc-date-picker{flex:0 0 22px;width:22px!important;min-width:22px!important;height:24px;min-height:24px;padding:1px}
.gc-standard-grid .gc-date-filter input:invalid{border-color:#b91c1c!important}
.gc-standard-grid .tabulator-row .tabulator-cell:not(.tabulator-editing) :is(.br-text,.atk-amount){overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:anywhere}

/* One compact sorting control across all list headers. Filters remain separate. */
.dg-grid.tabulator .tabulator-header .tabulator-col .tabulator-col-sorter{width:22px;border-radius:5px;transition:background-color .15s ease;color:#8792a2}
.dg-grid.tabulator .tabulator-header .tabulator-col .tabulator-col-sorter:hover{background:#e8edf3;color:#344256}
.dg-grid.tabulator .tabulator-header .tabulator-col .tabulator-col-sorter .tabulator-arrow{border:0!important;width:18px;height:22px;display:flex;align-items:center;justify-content:center;margin:0}
.dg-grid.tabulator .tabulator-header .tabulator-col .tabulator-arrow::before{content:'↕';font-family:Arial,sans-serif;font-size:16px;font-weight:400;line-height:1}
.dg-grid.tabulator .tabulator-header .tabulator-col[aria-sort=ascending] .tabulator-arrow::before{content:'↑'}
.dg-grid.tabulator .tabulator-header .tabulator-col[aria-sort=descending] .tabulator-arrow::before{content:'↓'}
.dg-grid.tabulator .tabulator-header .tabulator-col:is([aria-sort=ascending],[aria-sort=descending]) .tabulator-col-sorter{color:#946600;background:#fff1ce}
