﻿/* =============================================================
   TO-DO LIST PAGE STYLES
   Scoped styles for the ToDoList.razor page and its components.
   Depends on CSS variables defined in styles.css (--primary,
   --white, --gray-*, --dark, etc.)
   ============================================================= */


/* ===== PAGE HEADER ===== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

    .header h1 {
        font-family: 'Playfair Display', serif;
        font-size: 32px;
        font-weight: 700;
        color: var(--dark);
        margin-bottom: 4px;
    }



/* ===== VIEW TOGGLE BAR ===== */
/* ── Standardised page padding (matches event registration baseline: 16px sides) ── */
.content-wrapper {
    padding: 20px 16px;
}

.todo-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--white);
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--gray-700);
}

    .view-btn.active {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: var(--white);
        box-shadow: 0 4px 12px rgba(107,76,230,0.3);
    }

    .view-btn:not(.active):hover {
        background: var(--gray-100);
    }


/* ===== FILTER CONTROLS ===== */
/* Sits on the right side of .todo-controls-bar */
.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* "Show Closed" checkbox pill */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    user-select: none;
}

    .filter-checkbox:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .filter-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
        cursor: pointer;
        accent-color: var(--primary);
    }

/* Priority dropdown */
.filter-select {
    appearance: none;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    min-width: 150px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

    .filter-select:hover,
    .filter-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(107,76,230,0.12);
        outline: none;
    }


/* ===== STATUS BADGE ===== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

    .status-badge.status-open {
        background: #E3F2FD;
        color: #1565C0;
    }

    .status-badge.status-closed {
        background: var(--gray-200);
        color: var(--gray-700);
    }


/* ===== CLOSED CARD — DIMMED APPEARANCE ===== */
.todo-card.todo-closed {
    opacity: 0.6;
    border-left-color: var(--gray-300);
}

    .todo-card.todo-closed .todo-title {
        text-decoration: line-through;
        color: var(--gray-600);
    }


/* ===== LIST VIEW — CARD GRID ===== */
.todo-list-view {
    display: grid;
    gap: 14px;
    padding: 4px 0;
}

.todo-card {
    background: var(--white);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-left: 4px solid var(--gray-300);
    transition: all 0.3s;
}

    .todo-card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
        transform: translateY(-2px);
    }

    .todo-card.todo-priority-urgent {
        border-left-color: #7B1FA2;
    }

    .todo-card.todo-priority-high {
        border-left-color: #C62828;
    }

    .todo-card.todo-priority-med {
        border-left-color: #EF6C00;
    }

    .todo-card.todo-priority-low {
        border-left-color: #2E7D32;
    }


/* ===== CARD INTERNAL LAYOUT ===== */
.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

.todo-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    flex: 1;
}

.todo-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.todo-text {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 10px;
}

.todo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--gray-200);
}

.todo-info {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-600);
}

.todo-actions {
    display: flex;
    gap: 8px;
}


/* ===== CARD ACTION BUTTONS ===== */
.todo-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .todo-action-btn:hover {
        transform: scale(1.05);
    }

    .todo-action-btn.complete {
        background: #E8F5E9;
        color: #2E7D32;
    }

    .todo-action-btn.edit {
        background: #E3F2FD;
        color: #1976D2;
    }

    .todo-action-btn.delete {
        background: #FFEBEE;
        color: #C62828;
    }


/* ===== PRIORITY BADGE ===== */
.priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

    .priority-badge.priority-urgent {
        background: #F3E5F5;
        color: #7B1FA2;
    }

    .priority-badge.priority-high {
        background: #FFEBEE;
        color: #C62828;
    }

    .priority-badge.priority-med {
        background: #FFF3E0;
        color: #EF6C00;
    }

    .priority-badge.priority-low {
        background: #E8F5E9;
        color: #2E7D32;
    }


/* ===== EMPTY STATE ===== */
.todo-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

    .todo-empty-state p {
        margin-top: 12px;
        font-size: 15px;
        font-weight: 500;
    }


/* ===== DEADLINE ROW HIGHLIGHTS ===== */
.deadline-row {
    background-color: red;
}

.near-deadline-row {
    background-color: orange;
}


/* ===== DETAILS MODAL — READ-ONLY VIEW ===== */
.todo-details-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 0;
}

.todo-details-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.todo-details-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ev-primary, #6b4ce6);
    letter-spacing: 0.04em;
}

.todo-details-value {
    font-size: 14px;
    color: var(--ev-gray-900, #111);
    background: var(--ev-gray-100, #f5f5f5);
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.5;
}

.todo-details-multiline {
    white-space: pre-wrap;
    min-height: 60px;
}

.todo-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}


/* ===== ADD / EDIT MODAL FORM ===== */
.todo-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}

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

.todo-form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ev-gray-700, #374151);
}

.todo-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Input border/radius handled globally by overrides/sf-forms.css */
