/* V8 Asszisztens – view-specifikus (TODO, Jegyzetek, statisztika) */

/* ── Sötét mód: Keresési szűrőpanel input/select ── */
[data-theme="dark"] .search-filter-panel input,
[data-theme="dark"] .search-filter-panel select { background: #1a1f2e; border-color: var(--border); color: var(--text); }

.search-filter-panel {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    background: var(--panel-bg); display: flex; flex-direction: column; gap: 10px;
    flex-shrink: 0;
}

.search-filter-row {
    display: flex; gap: 16px; flex-wrap: wrap;
}

.search-filter-group {
    display: flex; flex-direction: column; flex: 1; min-width: 200px;
}

.search-filter-group label:first-child {
    font-size: 0.78rem; font-weight: bold; color: var(--cancel); margin-bottom: 4px;
}

.search-filter-group input[type="text"],
.search-filter-group select,
.search-filter-group input[type="date"] {
    padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px;
    font-size: 0.88rem; background: var(--panel-bg); color: var(--text);
}

[data-theme="dark"] .search-filter-panel { background: var(--panel-bg); }

.search-results-wrapper { width: 100%; max-width: 66%; display: flex; flex-direction: column; gap: 10px; }

/* ── TODO modul ── */
.todo-container {
    max-width: 900px; margin: 20px auto; padding: 0 16px;
}

.todo-header {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 16px;
}

.todo-header h2 {
    font-size: 1.4rem; color: var(--primary); margin: 0;
}

.todo-toolbar {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}

.todo-list {
    display: flex; flex-direction: column; gap: 6px;
}

.todo-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 8px;
    background: var(--panel-bg); border: 1px solid var(--border);
    border-left: 5px solid var(--border);
    transition: all 0.15s;
}

.todo-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.todo-item.done {
    opacity: 0.6;
}

.todo-item.done .todo-text {
    text-decoration: line-through;
}

.todo-checkbox {
    width: 22px; height: 22px; cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.todo-text {
    flex: 1; font-size: 0.95rem; color: var(--text);
    cursor: text; padding: 4px 0;
    word-break: break-word;
}

.todo-priority {
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 9px; border-radius: 12px;
    color: white; flex-shrink: 0;
    cursor: pointer;
}

.todo-due {
    font-size: 0.78rem; color: var(--cancel);
    flex-shrink: 0; white-space: nowrap;
}

.todo-due.overdue { color: #dc2626; font-weight: 600; }

.todo-cal-icon { font-size: 1rem; flex-shrink: 0; opacity: 0.6; }

.todo-actions {
    display: flex; gap: 4px; flex-shrink: 0;
}

.todo-actions button {
    background: none; border: none; cursor: pointer;
    font-size: 1rem; padding: 4px 6px; border-radius: 4px;
    opacity: 0.7; transition: opacity 0.15s, background 0.15s;
}

.todo-actions button:hover { opacity: 1; background: var(--border); }

.todo-drag-handle {
    cursor: grab; color: var(--cancel); user-select: none;
    font-size: 1.1rem; padding: 0 4px;
}

.todo-drag-handle:active { cursor: grabbing; }

.todo-item.dragging { opacity: 0.4; }

.todo-item.drag-over { border-top: 2px solid var(--primary); }

.todo-empty {
    text-align: center; color: var(--cancel);
    padding: 40px 20px; font-style: italic;
}

.todo-section-title {
    font-size: 0.78rem; font-weight: 700;
    color: var(--cancel); text-transform: uppercase;
    letter-spacing: 0.06em; margin: 16px 0 8px 0;
}

/* TODO szerkesztő modal */
.todo-edit-row {
    display: flex; gap: 8px; margin-bottom: 10px; align-items: center;
}

.todo-edit-row label { min-width: 90px; font-weight: 600; color: var(--cancel); font-size: 0.85rem; }

.todo-edit-row input[type="text"],
.todo-edit-row input[type="date"],
.todo-edit-row select {
    flex: 1; padding: 7px 9px; border: 1px solid var(--border); border-radius: 5px;
    font-size: 0.9rem; background: var(--panel-bg); color: var(--text);
}

/* Prioritás kezelő */
.priority-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }

.priority-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 6px; background: var(--bg-color);
}

.priority-color-swatch {
    width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; flex-shrink: 0; border: 2px solid var(--border);
}

.priority-name-input {
    flex: 1; padding: 5px 8px; border: 1px solid var(--border);
    border-radius: 4px; font-size: 0.88rem; background: var(--panel-bg); color: var(--text);
}

[data-theme="dark"] .todo-item { background: var(--surface); }

/* ── Jegyzetek modul ── */
.notes-container {
    max-width: 800px; margin: 20px auto; padding: 0 16px;
}
.notes-header {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 16px;
}
.notes-header h2 {
    font-size: 1.4rem; color: var(--primary); margin: 0;
}
.notes-toolbar {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
    align-items: center;
}
.notes-search {
    flex: 1; min-width: 200px; padding: 8px 12px;
    border: 1px solid var(--border); border-radius: 6px;
    font-size: 0.9rem; background: var(--panel-bg); color: var(--text);
}
.notes-list {
    display: flex; flex-direction: column; gap: 4px;
}
.note-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px;
    background: var(--panel-bg); border: 1px solid var(--border);
    cursor: pointer; transition: all 0.15s;
}
.note-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: var(--primary);
}
.note-pin {
    font-size: 1rem; flex-shrink: 0; opacity: 0.9;
}
.note-title {
    flex: 1; font-weight: 600; color: var(--text);
    word-break: break-word;
}
.note-date {
    font-size: 0.78rem; color: var(--cancel);
    flex-shrink: 0; white-space: nowrap;
}
.note-actions {
    display: flex; gap: 4px; flex-shrink: 0;
}
.note-actions button {
    background: none; border: none; cursor: pointer;
    font-size: 0.95rem; padding: 4px 6px; border-radius: 4px;
    opacity: 0.6; transition: opacity 0.15s, background 0.15s;
}
.note-actions button:hover { opacity: 1; background: var(--border); }
.note-divider {
    border: none; border-top: 1px dashed var(--border);
    margin: 12px 0 6px 0;
}
.note-section-title {
    font-size: 0.72rem; font-weight: 700; color: var(--cancel);
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 6px 4px; margin-top: 4px;
}
.notes-empty {
    text-align: center; color: var(--cancel);
    padding: 40px 20px; font-style: italic;
}
[data-theme="dark"] .note-row { background: var(--surface); }

/* ── Jegyzet keresés X gomb ── */
.notes-search-wrap {
    position: relative; flex: 1; min-width: 200px;
    display: flex; align-items: center;
}
.notes-search-wrap .notes-search {
    flex: 1; padding-right: 34px;
}
.notes-search-clear {
    position: absolute; right: 6px;
    width: 22px; height: 22px; border-radius: 50%;
    border: none; background: var(--cancel); color: white;
    cursor: pointer; font-size: 0.75rem; line-height: 1;
    display: none; align-items: center; justify-content: center;
    padding: 0;
}
.notes-search-clear:hover { background: var(--danger); }

/* ── Jegyzet színválasztó ── */
.note-color-swatch {
    width: 26px; height: 26px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: var(--cancel); padding: 0;
    transition: transform 0.1s;
}
.note-color-swatch:hover { transform: scale(1.15); }
.note-color-swatch.selected {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--panel-bg), 0 0 0 4px var(--text);
}
