/* Tasks Floating Button (Bottom Right) */
.tasks-float-btn {
    position: fixed;
    bottom: 20px;
    right: 90px;
    width: 56px;
    height: 56px;
    background: var(--card-bg);
    /* Border removed as requested */
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1040;
    color: var(--text-color);
    font-size: 24px;
}

.tasks-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    color: #fd7e14;
}

/* Active State */
.tasks-float-btn.active {
    background: #fd7e14;
    color: white;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.4);
}

.tasks-float-btn.shake {
    animation: taskShake 2s infinite ease-in-out;
}

@keyframes taskShake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    5% {
        transform: rotate(-10deg);
    }

    10% {
        transform: rotate(10deg);
    }

    15% {
        transform: rotate(-10deg);
    }

    20% {
        transform: rotate(0deg);
    }
}

/* Count Badge */
.tasks-count-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: white;
    color: #fd7e14;
    border: 2px solid #fd7e14;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar Styles - Fixed Height Floating */
.tasks-sidebar {
    position: fixed;
    right: 20px;
    bottom: 90px;
    top: auto;
    /* Fixed 1/3 screen height */
    height: 35vh;
    min-height: 35vh;
    max-height: 35vh;
    width: 380px;
    max-width: 90vw;
    background: var(--card-bg);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-left: none;
    z-index: 1051;
    display: flex;
    flex-direction: column;
    animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tasks-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--hover-bg);
    border-radius: 12px 12px 0 0;
}

.tasks-header h6 {
    font-weight: 600;
    color: var(--text-color);
}

.tasks-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.tasks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--muted-text);
    opacity: 0.6;
}

.tasks-empty i {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Task Card */
.task-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.task-card-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.task-icon {
    padding-top: 2px;
}

.task-details {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text-color);
    /* Fix for dark mode readability */
}

.task-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.task-cancel-btn {
    padding: 2px 6px;
    font-size: 12px;
}

/* Backdrop */
.tasks-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    /* No background color, just click catch */
}