 :root {
  --todo-widget-bg: #fff;
  --todo-header-bg: #fff;
  --todo-actions-bg: #fff;
  --todo-task-list-bg: #fff;
  --todo-task-bg: #f9f9f9;
  --todo-task-check-color: #4b804d;
  --todo-remove-button-color: #cd4331;
  --todo-font-family: Arial, sans-serif;
  --todo-font-size: 14px;
  --todo-widget-width: 600px;
  --todo-padding: 12px 16px;
  --todo-shadow: 0 2px 4px 5px rgba(0,0,0,0.1);
}
.todo-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--todo-widget-bg);
  font-family: var(--todo-font-family);
  font-size: var(--todo-font-size);
  max-width: var(--todo-widget-width);
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--todo-shadow);
  max-height: 100%;
}

.todo-header {
    background: var(--todo-header-bg);
    padding: var(--todo-padding);
    margin: 0;
    display: grid;
    grid-template-columns: auto 50px 36px;
    align-items: center;
    gap: 5px;
}

.todo-actions {
  background: var(--todo-actions-bg);
  padding: var(--todo-padding);
  display: flex;
}

.todo-task-list {
  padding: var(--todo-padding);
  background: var(--todo-task-list-bg);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 100%;
  overflow: auto; 
}

.todo-task {
  display: grid;
  grid-template-columns: 20px auto 23px;
  align-items: center;
  justify-items: start;
  gap: 10px;
  background: var(--todo-task-bg);
  padding: 8px;
  border-radius: 4px;
}

.todo-task-check,
.todo-remove-button,
.todo-add-button {
  cursor: pointer;
}

.todo-task-check {
  width: 20px;
  height: 20px;
  background: var(--todo-task-check-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.todo-input {
  border: 1px solid #ccc;
  border-radius: 16px 0 0 16px;
  padding: 12px;
  flex: 5;
  box-sizing: border-box;
  width:100%;
}

.todo-input:focus {
  outline: none;
  border-color: var(--todo-task-check-color);
}

.todo-add-button {
  background: var(--todo-task-check-color);
  color: #fff;
  border: none;
  border-radius: 0 16px 16px 0;
  padding: 12px 12px;
  flex: 1;
}

.todo-remove-button {
  background: var(--todo-remove-button-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
}

@media (max-width: 600px) {
    .todo-widget {
        max-width: 100%;
        width: 100%;
        height: 100%;
        font-size: 16px;
        border-radius: 0;
        box-shadow: none;
    }

    .todo-header, .todo-actions{
        background-color: rgba(0, 0, 0, 0.1);
    }

    .todo-actions,
    .todo-task-list {
        padding: 12px;
    }
    .todo-task {
        grid-template-columns: 24px auto 28px;
        padding: 12px;
    }
    .todo-input,
    .todo-add-button {
        padding: 14px 10px;
        font-size: 16px;
    }
    .todo-remove-button {
        padding: 10px 10px;
        font-size: 15px;
    }
}

@media (max-height: 600px) {
    .todo-widget {
        max-width: 100%;
        width: 100%;
        height: 100%;
        font-size: 16px;
        border-radius: 0;
        box-shadow: none;
    }
}