/* The page */ 

body {
    font-family: 'Inter', sans-serif;
    background: #f9f9f9;
    display: flex;
    justify-content: center;
    padding: 40px;
  }

  .container {
    background: white;
    padding: 20px;
    border-radius: 16px;
    width: 350px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20%;
  }


/* Tile and Toggle*/

h1 {
  font-family: 'Inter', sans-serif;
  font-size: 1.8em;
  font-weight: 600;
  color: #000000;
  margin: 0;
}


/* Header with inline toggle */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

 /* Mini toggle switch styling */

.mini-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

 
.toggle-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #616161;
  font-weight: 500;
}

 

.mini-slider {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
  background-color: #dfdfdf;
  border-radius: 9px;
  transition: .3s;
  border: 1.5px solid #dfdfdf;
}

 .mini-slider:before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 1px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
  border: 1px solid #dfdfdf;
}

 
#actionsToggle {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

#actionsToggle:checked + .mini-slider {
  background-color: #000000;
  border-color: #ffffff;
  border: 1.5px solid #000000;
}


#actionsToggle:checked + .mini-slider:before {
  transform: translateX(16px);
  border-color: #000000;
}

  .input-group {
    display: flex;
    width: 100%;
    max-width: 400px;
    height: 3em;  
    margin-bottom: 1.5rem;
  }

 
  .input-group input::placeholder {
    color: #9e9e9e;
    opacity: 1;
    font-size: 0.9rem;
  }
 

  .input-group input {
    flex: 1;
    padding: 0.75em 1em; /* More padding */
    border: 2px solid #dfdfdf; /* Exact border from image */
    box-shadow: none; /* Removed shadow as it's not in the image */
    border-right: none; /* Remove right border so button connects seamlessly */
    border-radius: 8px 0 0 8px; /* Round only the left side */
    outline: none;
    font-size: 0.9rem;
    color: #212121;
    background: white;
    font-family: 'Inter', sans-serif;
  }

 

  .input-group button {
    padding: 0 1em;
    border: 2px solid #dfdfdf; /* Exact border from image */
    background: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    border-radius: 0 4px 4px 0; /* Subtler rounding to match input */
    cursor: pointer;
    outline: none;
    font-size: 1rem;
    font-weight: 600; /* Slightly bolder text */
    transition: background 0.2s ease; /* Added hover effect */
  }

  .input-group button:hover {
    background: #000000; /* Slightly darker on hover */
    color: white;
  }

  ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0; /* Added top margin to match image spacing */
    font-family: 'Inter', sans-serif; /* Ensure font matches */
    font-size: 1rem;
  }

  li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
  }

  .left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .icons {
    display: flex;
    gap: 15px;
    cursor: pointer;
  }
 
  /* Custom Checkbox Styling */

  input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #dfdfdf; /* Matching the border color from your image */
  border-radius: 50%; /* Slightly rounded corners */
  outline: none;
  cursor: pointer;
  position: relative;
  vertical-align: top;  /* Change from middle to top */
  margin-right: 8px;
  flex-shrink: 0; /* if using flexbox */
}

 
input[type="checkbox"]:checked {
  background-color: #ffffff; /* Light gray background when checked */
  border-color: white;
}

 input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #424242; /* Dark gray checkmark */
  font-size: 1rem;
  font-weight: bold;
}

 

/* Task List Styling */

.task-category {
    font-size: 0.8em;
    color: #666;
    margin-left: 8px;
    font-style: italic;
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: #333;
    font-weight: 500;    
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

 

.task-content {
  display: flex;
  align-items: center;
}
 

.task-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #212121;
}
 

.action-icons {
  display: none; /* Hidden by default */
  gap: 12px;
}

 
.show-actions .action-icons {
  display: flex; /* Shown when actions are visible */
}

 
.edit-btn, .delete-btn {
  font-family: 'Segoe UI Symbol', sans-serif;
  cursor: pointer;
  user-select: none;
}

.edit-btn:hover, .delete-btn:hover{
  transform: translateY(-2px);
  color: #9e9e9e;
}



.move-btn{
  cursor: pointer;
  transition: transform 0.2s;
   user-select: none;
}

.move-btn:hover {
  transform: translateY(-2px);
  color: #9e9e9e;
}

.move-btn:active {
  transform: translateY(1px);
}

.strikethrough {
  text-decoration: line-through;
  color: #9e9e9e;
  cursor: pointer;
} 

/*.completed-separator {
  padding: 8px 0;
  margin: 8px 0;
  border-top: 1px solid #e0e0e0;
  color: #9e9e9e;
  font-size: 0.9em;
}*/
 

.left span {
  cursor: pointer;
}

.left input[type="checkbox"] {
  cursor: pointer;
}

footer{
  text-align: center;
  padding: 12px 0 0; /* Top padding only (12px top, 0 bottom) */
  color: #757575;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  border-top: 1px solid #e0e0e0;
  margin-top: 20px; /* Space above footer */
  padding: 0; /* Remove all padding */
  border-top: none; /* Remove border if desired */
  margin-top: 10px; /* Minimal space */
}


/* Filters and pop up */
.filters {
  margin: 20px 0px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-label {
  font-weight: 500;
  margin-right: 10px;
  font-size: 14px;
  color: #333;
  vertical-align: middle;
}

#addCategoryBtn{
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Active Category */
#addCategoryBtn.active {
  background-color: #3a86ff;
  color: white;
  border-color: #3a86ff;
}

#addCategoryBtn:hover {
  border-color: #ffffff;
  color: #ffffff;
  background-color: #000000;
}





/* Pop UP Modal Design */

.modal.hidden { display: none; }

/* Modal Container */
.modal {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  background: white;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  z-index: 1000;
  width: 320px;
  border: none;
}

.modal h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* Input Field */
#newCategoryName {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 16px;
  font-size: 14px;
  box-sizing: border-box;
}

#newCategoryName:focus {
  outline: none;
  border-color: #e0e0e0;
}

/* Color Options */
.color-options {
  display: flex;
  flex-wrap: wrap; /* This makes items wrap to next line */
  gap: 12px;
  margin: 0 0 24px 0;
}

.color {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.color:hover {
  transform: scale(1.1);
}

.color.selected {
  border: 2px solid #a3a3a3;
  transform: scale(1.1);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-actions button {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

#cancelCategory {
  background: white;
  border: 1px solid #ddd;
  color: #666;
}

#cancelCategory:hover {
  background: #f5f5f5;
}

#saveCategory {
  background: #000000;
  border: 1px solid #ffffff;
  color: white;
}

#saveCategory:hover {
  background: #000000;
}

#newSectionName {
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #e0e0e0;
  background-color: white;
  color: #333;
  box-sizing: border-box;
}

#newSectionName:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background-color: #f5f5f5;
}

#newSectionName.active {
  background-color: #000000;
  border: 2px solid #000000; /* Thicker border when active */
}

#newSectionName.active:hover {
  background-color: #333;
}


/* Drag and Drop feature design*/
.drag-handle {
  cursor: move;
  margin-right: 8px;
  padding: 0 5px;
  user-select: none;
  opacity: 0.5;
  touch-action: none; /* Important for touch devices */
}

.drag-handle:hover {
  opacity: 1;
}

li.dragging {
  opacity: 0.5;
  background: #f0f0f0;
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

li.drag-over-above {
  border-top: 3px solid #000000;
}

li.drag-over-below {
  border-bottom: 3px solid #000000;
}

.category-wrapper {
    position: relative;
    display: inline-block;
}

.category-close-btn {
    position: absolute;
    top: -6px;
    right: -5px;
    background: #000000;
    color: rgb(255, 255, 255);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-wrapper:hover .category-close-btn {
    opacity: 1;
}

button[contenteditable="true"] {
    outline: 2px dashed rgba(0,0,0,0.2);
    padding-right: 20px; /* Make space for close button */
}




