/**
 * MyTODO 커스텀 스타일
 * 토스 디자인 시스템 기반
 */

/* 기본 스타일 리셋 */
* {
  box-sizing: border-box;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d6db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b0b8c1;
}

/* 할일 카드 스타일 */
.todo-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.todo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 완료된 할일 스타일 */
.todo-card.completed {
  background: #f9fafb;
}

.todo-card.completed .todo-title {
  color: #8b95a1;
  text-decoration: line-through;
}

.todo-card.completed .todo-description {
  color: #b0b8c1;
}

/* 체크박스 커스텀 스타일 */
.todo-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #d1d6db;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.todo-checkbox:checked {
  background: #3182f6;
  border-color: #3182f6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}

.todo-checkbox:hover {
  border-color: #3182f6;
}

/* 액션 버튼 스타일 */
.action-btn {
  padding: 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
  color: #8b95a1;
}

.action-btn:hover {
  background: #f2f4f6;
  color: #4e5968;
}

.action-btn.delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* 로딩 스피너 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.border-3 {
  border-width: 3px;
}

/* 모달 애니메이션 */
#edit-modal {
  transition: opacity 0.2s ease;
}

#edit-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

#edit-modal:not(.hidden) {
  display: flex;
}

#edit-modal > div {
  transform: translateY(0);
  transition: transform 0.2s ease;
}

/* 포커스 스타일 개선 */
input:focus {
  outline: none;
}

button:focus {
  outline: none;
}

/* 반응형 조정 */
@media (max-width: 640px) {
  .todo-card {
    padding: 14px;
  }
}
