/* planner.css - Paper Checklist Style */

/* Reusing classes from habits.css for consistency: 
   .habit-category-header, .habit-checklist, .habit-item, .checkbox-square
*/

.planner-container {
    animation: fadeIn 0.4s ease-out;
}

.planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 1.25rem;
    font-family: 'Outfit', sans-serif;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateX(-4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Week Board Grid */
.week-checklist-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Minimal width for papers */
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: start;
}

/* Individual Day Column wrapper */
.column {
    /* No background, purely structural now */
    border: none;
    padding: 0;
    min-width: 250px;
}

/* Ensure checklists take full height/width of column */
.habit-checklist {
    background: rgba(30, 41, 59, 0.2);
    /* Slight tint for day columns */
}

/* Add Task Button Styling overrides for context */
.add-task-simple {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-task-simple:hover {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.02);
}

/* --- Responsive Planner --- */
@media (max-width: 768px) {
    .planner-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .planner-header h2 {
        font-size: 1.5rem;
    }

    .week-checklist-board {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding-bottom: 2rem;
        margin: 0;
        overflow-x: visible;
    }

    .column {
        width: 100%;
        min-width: auto;
        scroll-snap-align: none;
        flex-shrink: 1;
    }

    .habit-checklist {
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    /* Small dots or indicator for swiping? Browser provides scrollbar usually */
}
/* ═══════════════════════════════════════════
   TASK ITEMS in week view  —  clean layout
   ═══════════════════════════════════════════ */

.task-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .75rem;
    padding: .65rem .875rem;
    margin-bottom: 5px;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    transition: background .15s, border-color .15s;
    width: 100%; box-sizing: border-box;
    cursor: grab;
}
.task-item:last-child { margin-bottom: 0; }
.task-item:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }

/* reuse habit-checkbox styles */
.task-item .habit-checkbox {
    width: 20px; height: 20px; min-width: 20px;
    border: 2px solid rgba(255,255,255,.22);
    border-radius: 5px; background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #fff;
    font-size: .72rem; font-weight: 700;
    padding: 0; flex-shrink: 0;
    transition: all .2s;
}
.task-item .habit-checkbox:hover  { border-color: var(--accent-primary); background: rgba(129,140,248,.12); }
.task-item .habit-checkbox.checked{ background: var(--accent-primary); border-color: var(--accent-primary); box-shadow: 0 0 8px rgba(129,140,248,.35); }

/* task name fills remaining space */
.task-item .habit-label {
    flex: 1; min-width: 0;
    font-size: .875rem; font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35; word-break: break-word;
    text-align: left;
    transition: all .2s;
}

.task-item.done .habit-label { text-decoration: line-through; color: var(--text-muted); opacity: .5; }
.task-item.done .habit-checkbox { background: rgba(129,140,248,.4); border-color: rgba(129,140,248,.4); }

/* delete on the right */
.task-item .habit-delete {
    background: transparent; border: none;
    color: var(--text-muted); font-size: 1.05rem;
    cursor: pointer; opacity: 0;
    padding: 2px 5px; border-radius: 5px;
    transition: all .15s; line-height: 1; flex-shrink: 0;
}
.task-item:hover .habit-delete          { opacity: .4; }
.task-item .habit-delete:hover          { opacity: 1 !important; color: var(--danger); background: rgba(239,68,68,.1); }

/* light mode */
[data-mode="light"] .task-item { background: #fff; border-color: rgba(0,0,0,.07); }
[data-mode="light"] .task-item:hover { background: rgba(0,0,0,.02); }
[data-mode="light"] .task-item .habit-checkbox { border-color: rgba(0,0,0,.2); }
[data-mode="light"] .task-item .habit-label { color: #1e293b; }
