/* todo.css */

/* 할 일 입력 폼 */
.todo-form {
    margin-bottom: 10px;
  }
  
  .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .flex-1 {
    flex: 1;
    min-width: 120px;
  }
  
  .form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
  }
  
  /* 할 일 목록 */
  .task-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .task-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
  }
  
  .task-item:hover {
    background-color: var(--light-bg);
  }
  
  .task-item:last-child {
    border-bottom: none;
  }
  
  .task-checkbox {
    margin-right: 10px;
    position: relative;
  }
  
  .task-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
  }
  
  .task-checkbox label {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .task-checkbox input[type="checkbox"]:checked + label {
    background: var(--success);
    border-color: var(--success);
  }
  
  .task-checkbox input[type="checkbox"]:checked + label:after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
  }
  
  .task-content {
    flex: 1;
    margin-right: 10px;
  }
  
  .task-text {
    margin: 0 0 5px 0;
    font-size: 1rem;
    transition: color 0.2s;
  }
  
  .task-completed .task-text {
    text-decoration: line-through;
    color: var(--gray-500);
  }
  
  .task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--gray-500);
  }
  
  .task-duedate, .task-priority, .task-note-toggle {
    display: flex;
    align-items: center;
  }
  
  .task-duedate i, .task-priority i, .task-note-toggle i {
    margin-right: 4px;
  }
  
  .task-priority.priority-high {
    color: var(--danger);
  }
  
  .task-priority.priority-medium {
    color: var(--warning);
  }
  
  .task-priority.priority-low {
    color: var(--success);
  }
  
  .task-duedate.overdue {
    color: var(--danger);
    font-weight: 500;
  }
  
  .task-note {
    width: 100%;
    margin-top: 5px;
    font-size: 0.9rem;
    padding: 8px 12px;
    background: var(--light-bg);
    border-radius: 4px;
    white-space: pre-line;
    display: none;
  }
  
  .task-note.show {
    display: block;
  }
  
  .task-actions {
    display: flex;
    gap: 5px;
  }
  
  .task-actions button {
    background: none;
    border: none;
    padding: 5px;
    color: var(--gray-500);
    cursor: pointer;
    transition: color 0.2s;
  }
  
  .task-actions button:hover {
    color: var(--primary);
  }
  
  .task-actions button.delete-btn:hover {
    color: var(--danger);
  }
  
  /* 필터 및 통계 */
  .task-filter {
    display: flex;
    align-items: center;
    margin-left: auto;
  }
  
  .task-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--light-bg);
    border-radius: 6px;
    font-size: 0.9rem;
  }
  
  .task-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
  }
  
  /* 알림 설정 */
  .notification-info {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    background: var(--light-bg);
    border-radius: 6px;
    margin-bottom: 15px;
  }
  
  .notification-info i {
    margin-right: 10px;
    color: var(--info);
    margin-top: 3px;
  }
  
  .notification-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
  }
  
  /* 완료된 항목 섹션 */
  .collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .toggle-icon {
    transition: transform 0.3s;
  }
  
  .collapsible-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
  }
  
  .collapsible-section {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    max-height: 500px;
  }
  
  .collapsible-section.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  
  /* 완료된 목록 스타일 */
  .completed-list .task-item {
    opacity: 0.7;
  }
  
  /* 모달 스타일 */
  .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: auto;
    align-items: center;
    justify-content: center;
  }
  
  .modal.show {
    display: flex;
  }
  
  .modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    animation: modalFadeIn 0.3s;
  }
  
  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: translateY(-50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .modal-header h3 {
    margin: 0;
  }
  
  .close-modal {
    font-size: 24px;
    font-weight: bold;
    color: var(--gray-600);
    cursor: pointer;
  }
  
  .close-modal:hover {
    color: var(--primary);
  }
  
  .modal-body {
    padding: 20px;
  }
  
  /* 책임감 있는 디자인 */
  @media (max-width: 768px) {
    .form-row {
      flex-direction: column;
      gap: 10px;
    }
    
    .task-filter {
      flex-direction: column;
      gap: 10px;
      align-items: stretch;
      margin-left: 0;
      margin-top: 10px;
    }
    
    .task-stats {
      flex-direction: column;
      gap: 5px;
    }
    
    .task-actions {
      flex-direction: column;
      gap: 10px;
    }
  }
  
  /* 다크 테마 */
  body.dark-theme .task-item:hover {
    background-color: var(--dark-accent);
  }
  
  body.dark-theme .task-checkbox label {
    background: var(--dark-accent);
    border-color: var(--dark-border);
  }
  
  body.dark-theme .task-note {
    background: var(--dark-accent);
  }
  
  body.dark-theme .task-stats,
  body.dark-theme .notification-info {
    background: var(--dark-accent);
  }