/* MyTODO Custom Styles - Toss Design System */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

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

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

/* Todo item animations */
.todo-item {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.todo-item.removing {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* Checkbox custom style */
.todo-checkbox {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #d1d6db;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

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

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

.todo-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Completed todo style */
.todo-completed .todo-title {
  text-decoration: line-through;
  color: #8b95a1;
}

.todo-completed .todo-detail {
  color: #b0b8c1;
}

/* Modal animation */
#edit-modal.show {
  display: flex;
}

#edit-modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

/* Toast animation */
.toast {
  animation: toastIn 0.3s ease-out;
}

.toast.hiding {
  animation: toastOut 0.3s ease-out forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Button press effect */
button:active {
  transform: scale(0.98);
}

/* Focus visible for accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #3182f6;
  outline-offset: 2px;
}

/* Action buttons */
.action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

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

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