/* ============================
   Todo List - Modern Styling
============================ */

.todos-container {
    background-color: #1f2937;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    max-width: 700px;
    margin: 2rem auto;
    font-family: 'Inter', sans-serif;
}

/* Header */
.todos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.todos-title {
    color: #fbbf24;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Add Button */
.btn-todo-new {
    background: linear-gradient(90deg, #f1c232, #d4a520);
    color: #1a1b2f;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(241,194,50,0.3);
    transition: all 0.3s ease;
}

.btn-todo-new:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(241,194,50,0.4);
}

/* Filter Bar */
.todos-filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.todos-filter-group label {
    color: #f3f4f6;
    font-weight: 500;
}

.todos-filter-select {
    border-radius: 50px;
    background-color: #2c2a4d;
    color: #f3f4f6;
    border: 1px solid #374151;
    padding: 0.4rem 0.8rem;
}

/* Todo List */
#todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c2a4d;
    border-radius: 0.8rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    flex-wrap: wrap;
    word-break: break-word;
    transition: all 0.35s ease-in-out, box-shadow 0.4s ease;
}

.todo-item:hover:not(.todo-done) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.todo-item:active {
    transform: scale(0.98);
    box-shadow: 0 0 12px rgba(251,191,36,0.35);
}

/* Todo Info */
.todo-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

/* Priority Icons */
.todo-priority-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.todo-priority-icon.high {
    background-color: #ef4444;
}

.todo-priority-icon.medium {
    background-color: #fbbf24;
    box-shadow: 0 0 4px rgba(251,191,36,0.25);
}

.todo-priority-icon.low {
    background-color: #10b981;
    box-shadow: 0 0 4px rgba(34,197,94,0.25);
}

/* High Priority Pulse */
@keyframes pulseHigh {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(239,68,68,0.5);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 15px rgba(239,68,68,0.9);
    }
}

.todo-item:not(.todo-done) .todo-priority-icon.high {
    animation: pulseHigh 1.2s infinite ease-in-out;
}

/* Todo Name */
.todo-name {
    flex: 1;
    font-size: 1rem;
    color: #f3f4f6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: all 0.4s ease;
}

/* Priority Labels */
.todo-priority-label {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    color: #1a1b2f;
    text-transform: capitalize;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.priority-high .todo-priority-label {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.priority-medium .todo-priority-label {
    background: linear-gradient(90deg, #fcd34d, #fbbf24);
}

.priority-low .todo-priority-label {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

/* Actions */
.todo-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.todo-actions button,
.todo-actions a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #374151;
    color: #f3f4f6;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.todo-actions button:hover,
.todo-actions a:hover {
    transform: scale(1.1);
    color: #fbbf24;
}

.delete-todo-form {
    margin: 0;
}

/* Done Todos */
.todo-done {
    background: linear-gradient(90deg, #2a2a3d, #1f1e2f);
    opacity: 0.9;
    box-shadow: inset 0 0 10px rgba(251,191,36,0.1);
}

.todo-done:hover {
    box-shadow: 0 0 12px rgba(251,191,36,0.35),
                0 0 25px rgba(251,191,36,0.25),
                inset 0 0 8px rgba(251,191,36,0.2);
    transform: scale(1.015);
}

.todo-done .todo-name {
    color: #d1d5db;
    text-decoration: line-through;
    text-decoration-color: #fbbf24;
    text-decoration-thickness: 2px;
}

/* Priority Hover Glow */
.priority-high:not(.todo-done):hover {
    box-shadow: 0 0 12px rgba(239,68,68,0.45),
                0 0 28px rgba(239,68,68,0.25),
                inset 0 0 6px rgba(239,68,68,0.25);
    border-left: 3px solid #ef4444;
}

.priority-medium:not(.todo-done):hover {
    box-shadow: 0 0 12px rgba(251,191,36,0.45),
                0 0 28px rgba(251,191,36,0.25),
                inset 0 0 6px rgba(251,191,36,0.25);
    border-left: 3px solid #fbbf24;
}

.priority-low:not(.todo-done):hover {
    box-shadow: 0 0 12px rgba(34,197,94,0.45),
                0 0 28px rgba(34,197,94,0.25),
                inset 0 0 6px rgba(34,197,94,0.25);
    border-left: 3px solid #22c55e;
}

/* Empty List */
.todos-empty {
    text-align: center;
    color: #9ca3af;
    padding: 1.5rem 0;
}

/* Responsive Todos */
@media (max-width: 600px) {
    .todo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .todo-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .todo-priority-label {
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

/* ============================
   Todo Form Styling
============================ */

.todo-form-container {
    max-width: 480px;
    margin: 2rem auto;
    background-color: #1f2937;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    color: #f3f4f6;
    font-family: 'Inter', sans-serif;
}

.todo-form-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fbbf24;
    text-align: center;
}

.todo-form-group {
    margin-bottom: 1.5rem;
}

.todo-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #d1d5db;
}

.todo-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.todo-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 50px;
    border: 1px solid #374151;
    background-color: #2c2a4d;
    color: #f3f4f6;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.todo-input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 12px rgba(251,191,36,0.4);
    outline: none;
}

/* Priority Preview */
.priority-preview {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-left: 0.5rem;
    vertical-align: middle;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.priority-preview.low {
    background-color: #22c55e;
}

.priority-preview.medium {
    background-color: #fbbf24;
}

.priority-preview.high {
    background-color: #ef4444;
}

.priority-preview.pulse {
    animation: pulseGlow 1.5s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(239,68,68,0.5),
                0 0 12px rgba(239,68,68,0.3),
                inset 0 0 4px rgba(239,68,68,0.25);
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 4px rgba(239,68,68,0.3), 0 0 8px rgba(239,68,68,0.2);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 12px rgba(239,68,68,0.5), 0 0 18px rgba(239,68,68,0.35);
    }
}

/* Select Input */
.todo-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 50px;
    border: 1px solid #374151;
    background-color: #2c2a4d;
    color: #f3f4f6;
    font-size: 1rem;
    appearance: none;
    transition: all 0.3s ease;
}

.todo-select:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 12px rgba(251,191,36,0.4);
    outline: none;
}

/* Form Buttons */
.todo-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.todo-btn-submit,
.todo-btn-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.todo-btn-submit {
    background: linear-gradient(90deg, #fbbf24, #d4a520);
    border: none;
    color: #1a1b2f;
}

.todo-btn-submit:hover {
    background: linear-gradient(90deg, #d4a520, #c79f1f);
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(224,176,48,0.3);
}

.todo-btn-cancel {
    background-color: #374151;
    color: #f3f4f6;
    border: 1px solid #374151;
}

.todo-btn-cancel:hover {
    background-color: #4b5563;
    transform: scale(1.02);
}

/* Responsive Form */
@media (max-width: 480px) {
    .todo-form-container {
        padding: 2rem 1.5rem;
    }

    .todo-form-title {
        font-size: 1.6rem;
    }

    .todo-btn-submit,
    .todo-btn-cancel {
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* ============================
   Deleted (Papierkorb) Todos
============================ */
.todo-deleted-item {
    background: linear-gradient(90deg, #292641, #1f1e2f);
    opacity: 0.8;
    border-left: 3px solid #6b7280;
    box-shadow: inset 0 0 8px rgba(107,114,128,0.25);
}

.todo-deleted-item:hover {
    opacity: 1;
    box-shadow: 0 0 12px rgba(251,191,36,0.25),
                inset 0 0 10px rgba(251,191,36,0.15);
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

/* Restore Button */
.btn-todo-restore {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    background: linear-gradient(90deg, #fbbf24, #d4a520);
    color: #1a1b2f;
    box-shadow: 0 4px 10px rgba(251,191,36,0.3);
    transition: all 0.3s ease;
}

.btn-todo-restore:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(251,191,36,0.45);
}

/* Hover Glow */
.todo-deleted-item:hover .btn-todo-restore {
    box-shadow: 0 0 12px rgba(251,191,36,0.5);
}

/* Disabled Zustand (optional für Sicherheit) */
.btn-todo-restore:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* ============================
   Footer Buttons / Papierkorb
============================ */
.todos-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: 1.5rem;
}

/* Papierkorb-Button (gleiches Design wie + Neues Todo) */
.btn-todo-trash {
    background: linear-gradient(90deg, #f1c232, #d4a520);
    color: #1a1b2f;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(241,194,50,0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-todo-trash:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(241,194,50,0.4);
    text-decoration: none;
    color: #1a1b2f;
}



/* ============================
   Papierkorb - Buttons Styling
============================ */

/* Basis-Layout der Button-Leiste oben */
.todos-actions-top {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Papierkorb leeren (oben, rot) */
.btn-todo-empty {
    background: linear-gradient(90deg, #ef4444, #b91c1c);
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(239,68,68,0.35);
    transition: all 0.3s ease;
}

.btn-todo-empty:hover {
    background: linear-gradient(90deg, #dc2626, #991b1b);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(239,68,68,0.45);
}

/* ============================
   Wiederherstellen & Löschen Buttons in Liste
============================ */
.todo-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

.btn-restore,
.btn-delete-final {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    color: white;
}

/* Wiederherstellen (grün) */
.btn-restore {
    background: radial-gradient(circle at 30% 30%, #10b981, #047857);
    box-shadow: 0 0 10px rgba(16,185,129,0.3);
}
.btn-restore:hover {
    background: radial-gradient(circle at 30% 30%, #34d399, #065f46);
    box-shadow: 0 0 18px rgba(16,185,129,0.5);
    transform: scale(1.1);
}

/* Endgültig löschen (rot) */
.btn-delete-final {
    background: radial-gradient(circle at 30% 30%, #ef4444, #991b1b);
    box-shadow: 0 0 10px rgba(239,68,68,0.3);
}
.btn-delete-final:hover {
    background: radial-gradient(circle at 30% 30%, #f87171, #7f1d1d);
    box-shadow: 0 0 18px rgba(239,68,68,0.5);
    transform: scale(1.1);
}

/* ============================
   Todo-Box Styling (Papierkorb)
============================ */
.todo-deleted-item {
    background: linear-gradient(90deg, #2a2a3d, #1f1e2f);
    border-left: 3px solid #ef4444;
    border-radius: 0.8rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.todo-text {
    flex: 1;
}

.todo-name {
    font-weight: 700;
    color: #fbbf24;
}

.todo-content {
    color: #e5e7eb;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}


/* Einheitlicher Stil für Icons in Buttons */
.btn-todo-new i,
.btn-todo-empty i,
.btn-restore i,
.btn-delete-final i {
    margin-right: 6px;
    font-size: 1rem;
    vertical-align: middle;
}

/* Kleinere runde Buttons */
.btn-restore i,
.btn-delete-final i {
    margin-right: 0;
    font-size: 1.1rem;
}

/* Optional: sanftes Leuchten beim Hover */
.btn-restore:hover i {
    color: #bbf7d0;
    text-shadow: 0 0 6px rgba(34,197,94,0.7);
}
.btn-delete-final:hover i {
    color: #fecaca;
    text-shadow: 0 0 6px rgba(239,68,68,0.7);
}
