.kadec-tasks-container {
    max-width: 800px;
    margin: 0 auto;
    direction: rtl;
    border-radius: 10px;
}

.kadec-tasks-title {
    color: #fff;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kadec-tasks-list {
    margin-bottom: 20px;
}

.no-tasks {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.task-item {
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.task-item.completed {
    background: rgba(39, 174, 96, 0.1);
}

.task-header {
  display: flex;
  align-items: center;
  padding: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
  height: 33px;
  justify-content: space-between;
}

.task-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.task-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e74c3c;
}

.task-item.completed .task-status-dot {
    background: #27ae60;
}

.task-title {
    flex-grow: 1;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 223px;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    opacity: 0.7;
}

.task-expand-icon {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease;
}

.task-item.expanded .task-expand-icon {
    transform: rotate(180deg);
}

.task-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.task-content {
	padding: 5px 8px;
	color: #fff;
	line-height: 1.6;
	white-space: pre-wrap;
}

.task-date {

    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.task-actions {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px;
    align-items: center;
}

.task-toggle-btn {
    background: transparent;
    color: green;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.task-toggle-btn.completed {
    color: #27ae60;
}

.task-delete-btn {
    background: transparent;
    color: #e74c3c;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.task-delete-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #c0392b;
}

.add-task-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.add-task-form form {
    display: flex;
    flex-direction: row;
    gap: 3px;
}

.add-task-form input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px !important;
    color: #fff;
    padding: 10px !important;
}

.add-task-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    align-self: flex-end;
}

.add-task-btn:hover {
    background: var(--kadec-logo-color);
}

/* پیام‌ها */
.kadec-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.kadec-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

.kadec-success {
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid rgba(39, 174, 96, 0.5);
    color: #27ae60;
}

@media (max-width: 768px) {
    .kadec-tasks-container {
        padding: 15px;
    }

    .task-actions {
        flex-direction: row;
        justify-content: space-between;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.task-item {
    animation: fadeIn 0.3s ease;
}
