/**
 * Dashboard Aufgabenliste
 * Version: 1.1.0
 * Beschreibung: Div-Tabelle mit Float-Layout. Ermöglicht Textmarkierung 
 * im Task-Text bei gleichzeitigem Drag-Schutz über den Handle.
 */

/* Container-Struktur */
.tt-user-tasks-list-container {
    position: relative;
    width: 100%;
    min-height: 50px;
    padding: 0;
    box-sizing: border-box;
}

/* Einzelne Zeile (DIE DIV-TABELLE) */
.tt-user-task-item {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 3px;
    padding: 4px;
    border-radius: 4px;
    display: block; 
    position: relative;
    overflow: hidden; 
    transition: background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

/* Drag-Zustand */
.tt-user-task-item.dragging {
    opacity: 0.5;
    background: #f9f9f9;
    border: 1px dashed #3498db;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 9999;
}

/* Spalten-Simulierung per Float */

/* Der Griff zum Schieben: Hier ist Markieren verboten */
.tt-user-task-handle {
    float: left;
    width: 25px;
    text-align: left;
    color: #bbb;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
}

/* Der eigentliche Text: Hier ist Markieren ausdrücklich erlaubt */
.tt-user-task-text {
    float: left;
    width: calc(100% - 60px); 
    font-size: 14px;
    color: #333;
    word-wrap: break-word;
    user-select: text; 
    -webkit-user-select: text;
    cursor: auto;
}

/* Löschen-Button */
.tt-user-task-action-delete {
    float: right;
    width: 30px;
    text-align: right;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Hover-Zustand: Signalrot */
.tt-user-task-action-delete:hover,
.tt-user-task-action-delete:hover i {
    color: #d9534f !important;
}

/* Clearfix */
.tt-user-task-item::after {
    content: "";
    display: table;
    clear: both;
}

/* Eingabe-Bereich */
.tt-user-tasks-input-layer {
    padding: 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    overflow: hidden;
    width: 100%;
}

.tt-user-tasks-input-layer input {
    float: left;
    width: calc(100% - 100px);
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

/* Leermeldung */
.tt-user-tasks-empty-msg {
    padding: 8px;
    border: 1px solid #eee;
    text-align: center;
    color: #999;
    font-style: italic;
}


/* --- Haupt-Container: Begrenzung und Margin --- */
.content-dashboards {
    max-width: 1200px;
    width: 100%;
    background: none;
    padding: 0;
    text-align: left;
    margin-bottom: 20px; /* Bleibt als Abstand zum Element unter dem Dashboard */
    font-size: var(--font-size-content);
	height: AUTO;
	max-height: 100%;
}

.content-dashboards.b600 { max-width: 600px; }
.content-dashboards.b800 { max-width: 800px; }
.content-dashboards.b960 { max-width: 960px; }


/**
 * Dashboard Stylesheet - Kompakte Interaktion
 * * @package    DashboardSystem
 * @version    1.3.0
 */

/* 1. GRID */
.content-dashboards [id^="dashboard-bereich-"] {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: row dense;
    gap: 20px;
}

.dashboard-widget { position: relative; }

/* BREITEN & HÖHEN */
.dashboard-widget[data-widget-size="1"] { grid-column: span 1; }
.dashboard-widget[data-widget-size="2"] { grid-column: span 2; }
.dashboard-widget[data-widget-size="3"] { grid-column: span 3; }
.dashboard-widget[data-widget-size="4"] { grid-column: span 4; }

.dashboard-widget[data-widget-height="1"]  { grid-row: span 1; }
.dashboard-widget[data-widget-height="2"]  { grid-row: span 2; }
.dashboard-widget[data-widget-height="3"]  { grid-row: span 3; }
.dashboard-widget[data-widget-height="4"]  { grid-row: span 4; }
.dashboard-widget[data-widget-height="5"]  { grid-row: span 5; }
.dashboard-widget[data-widget-height="6"]  { grid-row: span 6; }
.dashboard-widget[data-widget-height="7"]  { grid-row: span 7; }
.dashboard-widget[data-widget-height="8"]  { grid-row: span 8; }
.dashboard-widget[data-widget-height="9"]  { grid-row: span 9; }
.dashboard-widget[data-widget-height="10"] { grid-row: span 10; }
.dashboard-widget[data-widget-height="11"] { grid-row: span 11; }
.dashboard-widget[data-widget-height="12"] { grid-row: span 12; }

/* 2. KOMPAKTE ICONS */
.widget-header {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 100;
}

.widget-controls {
    display: flex;
    gap: 1px; /* Fast kein Abstand zwischen den Icons */
    align-items: center;
}

.widget-resize-action {
    cursor: pointer !important;
    color: #888;
    font-size: 1.1rem; /* Originalgröße wie gewünscht */
    padding: 2px;      /* Minimaler Klickbereich */
    display: inline-flex;
    transition: color 0.1s;
}

.widget-resize-action:hover {
    color: #007bff !important;
}

/* Platz im Header freihalten */
h2.pagetitle {
    padding-right: 90px !important;
}

/* 3. DRAG STATES */
.tt-is-dragging { opacity: 0.3; outline: 1px dashed #999; }
body.tt-dashboard-dragging-active * { cursor: move !important; }
body.tt-dashboard-dragging-active input { pointer-events: none; }