/* ── Task list ──────────────────────────────── */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    min-height: 40px;
}

.task-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 6px;
    background: #fafafa;
    user-select: none;
}

.task-item-header {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.task-item.dragging {
    opacity: .35;
}

.task-item.drag-over {
    border-color: #4a90e2;
    background: #e8f0fb;
}

.drag-handle {
    cursor: grab;
    color: #bbb;
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

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

.task-label {
    width: 100%;
    padding-left: calc(1.1rem + 8px);
    margin-top: 3px;
    font-size: .85rem;
    color: #555;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.task-badge {
    font-size: .72rem;
    padding: 1px 6px;
    border-radius: 10px;
    background: #e0e0e0;
    color: #555;
    flex-shrink: 0;
    white-space: nowrap;
}

.task-badge.news {
    background: #dbeafe;
    color: #1e40af;
}

.task-badge.weather {
    background: #dcfce7;
    color: #166534;
}

.task-badge.weather_news {
    background: #fef9c3;
    color: #854d0e;
}

.task-badge.youtube {
    background: #fee2e2;
    color: #991b1b;
}

/* ── YouTube channel search ──────────────────── */
.yt-confirmed {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    font-size: .85rem;
}

.yt-confirmed-label {
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.yt-channel-id {
    font-size: .72rem;
    color: #888;
    font-family: monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.yt-thumb {
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.yt-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.yt-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background .12s;
}

.yt-result-item:last-child {
    border-bottom: none;
}

.yt-result-item:hover {
    background: #f0f4ff;
}

.yt-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.yt-result-info strong {
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yt-clear-btn {
    background: #888 !important;
    flex-shrink: 0;
}

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

.task-actions .btn-sm {
    background: #666;
}

.task-actions .btn-sm:hover {
    background: #333;
}

.btn-move {
    background: #888 !important;
    min-width: 28px;
    padding: 4px 6px;
}

.btn-move:hover:not(:disabled) {
    background: #555 !important;
}

.btn-move:disabled {
    background: #ccc !important;
    cursor: default;
    opacity: .5;
}

.btn-del {
    background: #c0392b !important;
}

.btn-del:hover {
    background: #922b21 !important;
}

.task-empty {
    color: #aaa;
    font-size: .85rem;
    padding: 14px 0;
    text-align: center;
}

/* ── Modal ──────────────────────────────────── */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .52);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modal {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    width: min(480px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 6px 32px rgba(0, 0, 0, .22);
}

#modal h2 {
    margin: 0 0 18px;
    font-size: 1.1rem;
    color: #333;
}

.type-radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.type-radios label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: .95rem;
}

.modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    background: #888 !important;
}

.btn-cancel:hover {
    background: #555 !important;
}

/* ── Status text ────────────────────────────── */
.s-ok {
    color: #27ae60;
    font-size: .85rem;
}

.s-err {
    color: #c0392b;
    font-size: .85rem;
}

.s-inf {
    color: #888;
    font-size: .8rem;
}