/* ============================================================
   Due Alert — polished fixed notification, bottom-right
   ============================================================ */

.due-alert-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 300px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 32px 72px rgba(0, 0, 0, 0.14),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.045);
    overflow: hidden;
    font-size: 13px;
    color: #1e293b;

    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transition: opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
                transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.due-alert-modal.due-alert-modal--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Header ───────────────────────────────────────────────── */

.due-alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 12px 12px 15px;
    background: linear-gradient(120deg, #ea580c 0%, #f97316 55%, #fb923c 100%);
    position: relative;
}

/* Subtle noise/grain texture overlay on the header */
.due-alert-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.18;
    pointer-events: none;
}

.due-alert-icon {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.due-alert-title {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex: 1;
    letter-spacing: -0.015em;
    position: relative;
    z-index: 1;
}

.due-alert-close {
    background: rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    transition: background 150ms, color 150ms;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.due-alert-close:hover {
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
}

/* ── Count badges ─────────────────────────────────────────── */

.due-alert-counts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 13px 9px;
    border-bottom: 1px solid #f1f5f9;
}

.due-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.due-alert-badge--overdue {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.due-alert-badge--overdue::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dc2626;
    flex-shrink: 0;
}

.due-alert-badge--today {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.due-alert-badge--today::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f97316;
    flex-shrink: 0;
}

/* ── Task list ────────────────────────────────────────────── */

.due-alert-tasks {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 10px 5px;
}

.due-alert-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-left-width: 3px;
    cursor: pointer;
    padding: 8px 10px 8px 9px;
    border-radius: 9px;
    text-align: left;
    transition: background 140ms, border-color 140ms, box-shadow 140ms, transform 140ms;
}

.due-alert-task--overdue {
    border-left-color: #ef4444;
    background: #fffafa;
}

.due-alert-task--today {
    border-left-color: #f97316;
    background: #fffcfa;
}

.due-alert-task:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.due-alert-task--overdue:hover {
    border-left-color: #dc2626;
    border-color: #fca5a5;
    border-left-color: #dc2626;
}

.due-alert-task--today:hover {
    border-color: #fdba74;
    border-left-color: #f97316;
}

.due-alert-task-title {
    font-size: 12.5px;
    color: #334155;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.due-alert-task-label {
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 5px;
    letter-spacing: 0.02em;
}

.due-alert-task--overdue .due-alert-task-label {
    background: #fee2e2;
    color: #b91c1c;
}

.due-alert-task--today .due-alert-task-label {
    background: #ffedd5;
    color: #c2410c;
}

/* ── More note ───────────────────────────────────────────── */

.due-alert-more {
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
    margin: 0;
    padding: 2px 14px 7px;
}

/* ── Snooze section ─────────────────────────────────────── */

.due-alert-snooze-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 8px 13px 5px;
    border-top: 1px solid #f1f5f9;
}

.due-alert-snooze-btns {
    display: flex;
    gap: 4px;
    padding: 0 10px 13px;
}

.due-alert-snooze-btn {
    flex: 1;
    padding: 6px 0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 130ms, color 130ms, border-color 130ms, box-shadow 130ms;
    letter-spacing: 0.01em;
}

.due-alert-snooze-btn:hover {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
    box-shadow: 0 1px 4px rgba(249, 115, 22, 0.15);
}
