/* ===== Pomodoro To-do List Styles ===== */
.pomodoro-todo-panel {
  gap: 1.25rem;
}

.pomodoro-todo-panel .todo-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pomodoro-todo-panel .todo-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.pomodoro-todo-panel .todo-header p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

.todo-form {
  display: flex;
}

.todo-input-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  gap: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.todo-input-wrapper:focus-within {
  border-color: rgba(242, 101, 7, 0.8);
  box-shadow: 0 0 0 3px rgba(242, 101, 7, 0.18);
  background: rgba(242, 101, 7, 0.12);
}

.todo-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  outline: none;
  min-height: 1.8rem;
}

.todo-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.todo-submit {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f26507, #ff8c42);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.todo-submit i {
  font-size: 1rem;
}

.todo-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(242, 101, 7, 0.35);
}

.todo-submit:active {
  transform: translateY(0);
}

.todo-empty {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.todo-list.empty {
  display: none;
}

.todo-list::-webkit-scrollbar {
  width: 8px;
}

.todo-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.todo-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.todo-list::-webkit-scrollbar-thumb:hover {
  background: rgba(242, 101, 7, 0.6);
}

.todo-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.todo-item:hover {
  border-color: rgba(242, 101, 7, 0.35);
  transform: translateY(-1px);
}

.todo-item.completed {
  background: rgba(31, 221, 194, 0.08);
  border-color: rgba(31, 221, 194, 0.35);
}

.todo-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  cursor: pointer;
  user-select: none;
  position: relative;
  min-width: 0;
}

.todo-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.todo-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.35rem;
  border: 2px solid rgba(242, 101, 7, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.todo-checkbox::after {
  content: '\2713';
  font-size: 0.75rem;
  color: #0c0c0c;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.todo-toggle:checked + .todo-checkbox {
  background: linear-gradient(135deg, #1fddc2, #4d8cff);
  border-color: transparent;
}

.todo-toggle:checked + .todo-checkbox::after {
  opacity: 1;
  transform: scale(1);
}

.todo-text {
  color: #ffffff;
  transition: color 0.2s ease;
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.todo-item.completed .todo-text {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: line-through;
}

.todo-delete {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  margin-top: 0.1rem;
}

.todo-delete:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}

.todo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

.todo-clear-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.todo-clear-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.todo-clear-btn:not(:disabled):hover {
  background: rgba(242, 101, 7, 0.2);
  border-color: rgba(242, 101, 7, 0.5);
}

@media (max-width: 768px) {
  .todo-list {
    max-height: 240px;
  }
}

@media (max-width: 480px) {
  .todo-input-wrapper {
    padding: 0.2rem 0.2rem 0.2rem 0.6rem;
  }

  .todo-submit {
    width: 2rem;
    height: 2rem;
  }

  .todo-item {
    padding: 0.65rem 0.75rem;
  }
}
