/* 待办页面主样式 */
.todo_body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.todo_container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 导航区域 */
.todo_navigation-block {
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.todo_date-display {
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.todo_parent-menu-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.todo_parent-menu-arrow {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
}

.todo_parent-menu-scroll-container {
    flex: 1;
    overflow: hidden;
}

.todo_parent-menu-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.todo_parent-menu {
    display: inline-flex;
}

.todo_parent-menu-item {
    padding: 8px 16px;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.todo_parent-menu-item.active {
    background-color: #1890ff;
    color: white;
}

.todo_child-menu-container {
    display: flex;
    align-items: center;
}

.todo_child-menu-arrow {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
}

.todo_child-menu-scroll-container {
    flex: 1;
    overflow: hidden;
}

.todo_child-menu-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.todo_child-menu {
    display: inline-flex;
}

.todo_child-menu-item {
    padding: 6px 12px;
    margin-right: 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.3s;
}

.todo_child-menu-item.active {
    background-color: #52c41a;
    color: white;
}

/* 交互区域 */
.todo_result-space {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.todo_initial-message {
    text-align: center;
    color: #999;
    margin-top: 50px;
    font-size: 14px;
}

/* 输入栏 */
.todo_input-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.todo_input-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.todo_input-bar button {
    padding: 10px 20px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.todo_input-bar button:hover {
    background-color: #40a9ff;
}

/* 待办项目样式 */
.todo_item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background-color: #fafafa;
    border-radius: 4px;
    border-left: 4px solid #1890ff;
}

.todo_item.completed {
    border-left-color: #52c41a;
    opacity: 0.7;
}

.todo_item-checkbox {
    margin-right: 10px;
}

.todo_item-content {
    flex: 1;
}

.todo_item-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.todo_item-meta {
    font-size: 12px;
    color: #999;
}

.todo_item-actions {
    display: flex;
    gap: 5px;
}

.todo_item-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #666;
}

/* 待办模块浮动按钮组样式 - 采用kitout风格 */
.todo_button-group {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
    background: rgba(248, 249, 250, 0.9); /* 浅灰色半透明背景 */
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(224, 224, 224, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 浮动按钮样式 - 采用kitout风格 */
.todo_floating-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9); /* 透明背景 */
    color: #333 !important;
    border: 1px solid #e0e0e0; /* 浅边框 */
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.todo_floating-button:hover {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #dc3545;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.todo_floating-button:active {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(0.95);
}

/* 未选中状态 */
.todo_floating-button[data-action="添加待办"],
.todo_floating-button[data-action="待办列表"] {
    background-color: rgba(255, 255, 255, 0.9) !important; /* 白色背景 */
    color: #333 !important; /* 黑色文字 */
    border: 1px solid #e0e0e0 !important; /* 浅灰色边框 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* 未选中状态悬停效果 */
.todo_floating-button[data-action="添加待办"]:hover,
.todo_floating-button[data-action="待办列表"]:hover {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: #dc3545 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

/* 选中状态 */
.todo_floating-button.active {
    background-color: transparent !important; /* 透明背景 */
    color: #dc3545 !important; /* 红色文字 */
    border: 2px solid #dc3545 !important; /* 红色边框 */
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3) !important; /* 红色阴影 */
}

/* 选中状态悬停效果 */
.todo_floating-button.active:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border: 2px solid #c82333 !important;
}

/* 模态框样式 */
.todo_modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.todo_modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

/* 添加待办模态框特殊样式 */
#todo_addTodoModal .todo_modal-content {
    margin: 5% auto;
    max-width: 550px;
}

/* 表单样式 */
.todo_form {
    margin-bottom: 20px;
}

/* 表单行布局 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* 表单字段样式 */
.form-field {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 表单标签样式 */
.form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    padding: 4px 0;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

/* 任务描述标签特殊样式 */
.form-field label[for="todo_description"] {
    font-size: 15px;
    color: #1890ff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-left: 8px;
}

.form-field label[for="todo_description"]::before {
    content: ""; 
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, #1890ff, #40a9ff);
    border-radius: 3px;
}

/* 悬停效果 */
.form-field label:hover {
    color: #1890ff;
    transform: translateX(2px);
}

.form-field label[for="todo_description"]:hover {
    transform: translateX(4px);
    text-shadow: 0 0 8px rgba(24, 144, 255, 0.3);
}

/* 表单输入框样式 */
.todo_form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.todo_form-textarea {
    width: 100%;
    height: 150px; /* 大约6行高 */
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
    resize: vertical;
}

.todo_form-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 提醒字段特殊样式 */
.reminder-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 模态框淡入动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.todo_modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.todo_modal-close:hover {
    color: #666;
}

.todo_modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.todo_modal-text {
    margin-bottom: 20px;
    color: #666;
}

.todo_modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.todo_modal-cancel, .todo_modal-confirm {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 80px;
}

.todo_modal-cancel {
    background-color: #f5f5f5;
    color: #666;
}

.todo_modal-cancel:hover {
    background-color: #e6e6e6;
    color: #333;
}

.todo_modal-confirm {
    background-color: #1890ff;
    color: white;
}

.todo_modal-confirm:hover {
    background-color: #40a9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

/* 添加待办模态框特殊样式 */
#todo_addTodoModal .todo_modal-buttons {
    margin-top: 28px;
}

/* API任务相关样式 */
.todo_loading {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* 分页组件样式 */
.todo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    gap: 15px;
}

.todo-pagination-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.todo-pagination-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.todo-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.todo-pagination-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.todo-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-task-item {
    background-color: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.todo-task-completed {
    border-left: 4px solid #52c41a;
    opacity: 0.8;
}

.todo-task-pending {
    border-left: 4px solid #1890ff;
}

.todo-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.todo-task-title {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    flex: 1;
}

.todo-task-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #666;
}

.todo-task-completed .todo-task-status {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.todo-task-pending .todo-task-status {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.todo-task-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* HTML内容样式支持 */
.todo-task-description ol {
    padding-left: 20px;
    margin: 8px 0;
}

.todo-task-description li {
    margin: 4px 0;
    line-height: 1.6;
}

/* 支持空格字符 */
.todo-task-description * {
    unicode-bidi: embed;
    white-space: normal;
}

.todo-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.todo-task-time {
    flex: 1;
}

/* 本地待办列表样式 */
.todo_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 隐藏元素 */
.todo_hidden {
    display: none !important;
}