* {
    margin: 0;
    box-sizing: border-box;
    /* border:solid red 1px; */
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; /* Microsoft To-Do style */
    font-weight: 400;  /* normal text weight */
    line-height: 1.5;
    color: #333;
}
    
header{
  display: flex;
  align-items: center;
  justify-content: space-between; /* left and right */
  width: 100%;
  background-color: rgb(226,33,97);
  color: white;
  padding: 0.8rem 1rem; /* fixed height-ish */
  box-sizing: border-box;
  min-height: 64px;
  gap: 12px;
}

/* remove the weird border/height forcing on every child
header > div {
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
} */

/* logo / title area (left) */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 5.0rem;
}

/* stacked To/Do block */
.logo-stack {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 56px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.2);
  color: white;
  font-weight: 700;
  line-height: 1;
}

/* site title if you have one */
header h1 {
  font-size: 2.3rem;
  margin: 0;
  font-weight: 700;
  margin-left: 3rem;
}

/* header right: avatar & controls */
.header-right {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* avatar circle (no arbitrary large margin-left) */
.avatar-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 200px;           /* max width of the box */
    padding: 6px 12px;
    background-color: #fff;
    color: rgb(226,33,97);
    font-weight: 600;
    font-size: clamp(12px, 2vw, 16px); /* font shrinks for long names */
    border: 1px solid rgb(226,33,97);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;    /* optional: shows ... if extremely long */
    text-align: center;
    cursor: default;
    margin-left: 1000px;
}

#logout-button {
    padding: 0.4rem 1rem;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
}

#logout-button:hover {
    background: white;
    color: rgb(226, 33, 97);
}


/* small vertical control buttons next to avatar */
.header-controls {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
}

main{
    display: flex;
    flex-direction: row;
    width: 100%;
    /* border: 2px solid green; */
    background-color: white;
}

.task-form-list-container {
    /* border: 3px solid red; */
    display: flex;
    flex: 1.5;
    flex-direction: column;

}

.disabled {
    pointer-events: none;      /* disables all clicks / inputs */
    opacity: 0.5;              /* makes it look dimmed */
    user-select: none;          /* prevents text selection */
    cursor: none;
}

.disappear {
    display: none !important;
}


.task-form {
    /* border : 3px solid violet; */
   /* Keeps it readable, but allows shrinking */          /* Allows flex children to shrink */
    display: flex;
    flex-direction: column;
    margin: 10px;
   
}

.task-input-row {
    /* border : 2px solid orangered; */
    display: flex;
    flex-direction: row;  
    justify-content: space-between;
     
}


#task-input {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    background: #fff0f5;
    border-radius: 6px;
    margin-bottom: 8px;
    /* border : 2px solid blue;    */
    font-size: 1rem;
    width: 500px;
    height: 45px;
    display: flex;
    padding-left: 10px;
}

#add-button {
    height: 36px;
    padding: 6px 12px;
    border: 1px solid  rgb(226, 33, 97);
    border-radius: 6px;
    background: #fff0f5;
    color: #666;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
}

#add-button.enabled {
    background: rgb(226, 33, 97);
    color: white;
    cursor: pointer;
    border-color: rgb(226, 33, 97);
    box-shadow: 0 6px 18px rgba(226,33,97,0.14);
    transform: translateY(-1px);
}

#add-button.enabled:hover {
    background: rgb(206, 13, 77);
    box-shadow: 0 8px 22px rgba(206,13,77,0.18);
}

#add-button:disabled {
    opacity: 0.45;
    border: 1px solid  rgb(226, 33, 97);
    cursor: not-allowed;
    filter: grayscale(80%) contrast(0.85) brightness(0.95);
    box-shadow: none;
    transform: none;
}

#add-button:disabled:hover {
    transform: none;
    box-shadow: none;
    filter: grayscale(90%) contrast(0.8) brightness(0.9);
}


#add-button:not(.enabled):hover {
    cursor: not-allowed;
}

#main-content-container {
    display: flex;
    position: relative;
}

#task-info-container{
    /* border:#ffd700; */
    display: flex;
    flex-direction: row;
    gap: 50px;
    align-items: center;
    justify-content: center;
    margin: 30px;
}

#task-priority {
    display: flex;
    align-items: center;
    gap: 10px;
}

#priority-input {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

#priority-select {
    height: 36px;
    padding: 6px 10px;
    width: 100px;
    text-align: center;
    border: 1px solid #f0d0e0;
    border-radius: 6px;
    background: #fff0f5;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#priority-select:hover {
    border-color: rgb(226, 33, 97);
    box-shadow: 0 2px 6px rgba(226, 33, 97, 0.1);
}

#priority-select:focus {
    outline: none;
    border-color: rgb(226, 33, 97);
    box-shadow: 0 0 0 3px rgba(226, 33, 97, 0.1);
}

#task-date-label{
    font-weight: bold;
    width: 120px;
}

#task-date-input{
    width: 120px;
    text-align: center;
}

#task-time-label{
    display: none;
    font-weight: bold;
}

#task-time-input{
    display: none;
    width: 75px;
    text-align: center;
}

.date-row {
    /* border : 3px solid aquamarine; */
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
    
}

.task-datetime {
    flex-shrink: 0;
    /* border : 2px solid skyblue; */
    padding: 0.5rem;
    font-size: 1rem;
    width: 200px;      /* Add this line */
    max-width: 100%;   /* Optional: ensures it doesn't overflow */
}


.date-label {
    font-size: 0.75rem;
    color: #555;
    margin-bottom: 0.2rem;
}

.task{
    border : 2px solid olive;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #eee;       
}


.task-text {
    /* border : 2px solid brown; */
    font-size: 1.1rem;
    margin-bottom: 4px;
}

#identifier-sorter-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
    justify-content: space-between;
    border-bottom: 2px solid #f0d0e0;
}

#to-do-list-identifier {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
    gap: 10px;

}

#to-do-list-identifier p {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: rgb(226, 33, 97);
    letter-spacing: 0.5px;
}

#task-sorter {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 2px;
    gap: 10px;
    /* nudge the sorter slightly left from the right edge */
    margin-right: 20px;
}

#task-sorter-input {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    width: auto;
    height: auto;
    text-align: left;
}

#sorter-select {
    height: 36px;
    padding: 6px 10px;
    text-align: center;
    width: 140px;
    border: 1px solid #f0d0e0;
    border-radius: 6px;
    background: #fff0f5;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#sorter-select:hover {
    border-color: rgb(226, 33, 97);
    box-shadow: 0 2px 6px rgba(226, 33, 97, 0.1);
}

#sorter-select:focus {
    outline: none;
    border-color: rgb(226, 33, 97);
    box-shadow: 0 0 0 3px rgba(226, 33, 97, 0.1);
}

.task-list{
    /* border : 2px solid red; */
    list-style-type: none;
    display: flex;
    width: 100%;
    height: 490px;
    flex-direction: column;
}

#task-column-header{
    display: flex;
    flex-direction: row;
    width: 100%;
    background-color: rgb(226, 33, 97);
}


#task-column-header > div{
    border: 1px solid white;
    color: white;
    display: flex;
    padding: 5px;
    height: 45px;
    justify-content: center;
}

#task-header-title{
    flex: 4.17;  
}

#task-header-date-added{
    flex: 1.5;
}

#task-header-duedate{
    flex: 1.5;
}

#task-header-priority{
    flex: 0.8;
}

#task-header-actions{
    flex: 1.2;
}

.task-item-container{
    display: flex;
    flex-direction: column;
    width: 100%;
}

.task-item{
    background: #fff0f5; /* very light pink for tasks */
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.1s;
    display: flex;
    height: 45px;
    width: 100%;
    align-items: center;
    flex-direction: row;
}

.task-item > div {
    display: flex;
    height: 45px;
    padding: 0 5px; 
    align-items: center;
}

.done-action{
    flex: 0.05;  
}

.task-item-content{
    justify-content: flex-start;
    flex: 3.91;  
}

.task-item-date-added{
    flex: 1.5;
    justify-content: center;
}

.task-item-duedate{
    flex: 1.5;
    justify-content: center;
}

.task-item-priority{
    flex: 0.8;
    justify-content: center;
}

.task-item-actions{
    width: 100%;
    display: flex;
    gap: 1rem;
    flex: 1.19;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    /* border: 2px solid green; */
    
}

#empty-modal-list{
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
}

#edit-modal{
    border: 3px solid blueviolet;
    position: absolute;
    right: 0;
    display: none;
    flex-direction: column;/*change to flex if edit btn clicked */
    width: 350px;
    height: 490px;
    background-color: white;
    transition: all 0.3s;
    pointer-events: auto;
    opacity: 1;
    user-select: auto;
    cursor: auto;
}

#edit-task-form  > div{
    padding: 10px;
}

h3{
    text-align: center;
}

#emodal-task-text{
    font-weight: bold;
}


#emodal-task-content{
    display: flex;
}
#emodal-task-duedate{
    gap: 5px;
    display: flex;
}
#emodal-date-label{
    font-weight: bold;
}

#emodal-task-duetime{
    gap: 5px;
    display: flex;
}

#emodal-time-label{
    font-weight: bold;
}

#emodal-task-priority{
    display: flex;
    gap: 5px;
}
#emodal-priority-input{
    font-weight: bold;
}
#emodal-task-date-created{
    display: flex;
}

#emodal-delete-button{
    display: flex;
    align-self: flex-end;
}

/* #emodal-save-edit-button{
    display: flex;
    align-self: center;
    text-align: center;
    justify-content: center;
    background-color: aquamarine;
} */

#emodal-actions{
    gap: 1rem;
    display: flex;
    justify-content: right;
    margin-top: 1.5 rem;
    flex-direction: row;
    margin-top: 1.5rem;
}

#task-column-header > div{
    display: flex;
    padding: 5px;
    height: 45px;
    justify-content: center;
}

#emodal-save-edit-button,
.edit-btn,
.delete-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    display: flex;
}

#emodal-save-edit-button,
.edit-btn {
    border : 2px solid green;
    background: aquamarine;
    color: #333;
}

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem 2.5rem;
  border-radius: 8px;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.done-task {
    text-decoration: line-through;
    color: rgba(100,100,100,0.5);
}

#emodal-cancel-button,
.cancel-btn {
  background: #ccc;
  color: #333;
  border: black;
  display: flex;
  border-radius: 4px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
}

.delete-btn {
    border : 2px solid black;
    background: #ff4d4d;
    color: white;
}

.done-action {
    display: flex;
    justify-content: center; /* horizontal center */
    align-items: center;     /* vertical center */
    height: 50px;            /* make sure parent has some height */
}

.done-btn {
    margin-right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #888;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
}

.done-btn.done {
    background: #4caf50;
    border-color: #4caf50;
}

.done-btn.done::after {
    content: '✔';
    color: #fff;
    font-size: 18px;
    position: absolute;
    
    left: 6px;
    top: 2px;
}

/* Hover/interactive styles for action buttons */
.edit-btn {
    background: #4caf50;
    color: #fff;
    border: none;
}
.edit-btn:hover {
    background: #3b8b45;
    box-shadow: 0 4px 12px rgba(59,139,69,0.18);
    transform: translateY(-1px);
}

.delete-btn {
    background: #ff4d4d;
    color: #fff;
    border: none;
}
.delete-btn:hover {
    background: #e03b3b;
    box-shadow: 0 4px 12px rgba(224,59,59,0.18);
    transform: translateY(-1px);
}

/* Modal confirm/cancel are using .delete-btn and .cancel-btn / #emodal-save-edit-button */
.cancel-btn, #emodal-cancel-button {
    background: #e9e9e9;
    color: #333;
    border: none;
}
.cancel-btn:hover, #emodal-cancel-button:hover {
    background: #d6d6d6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#confirm-delete-btn {
    /* ensure confirm uses delete visual */
}

/* Save/edit button hover */
#emodal-save-edit-button {
    background: #4caf50;
    color: white;
    border: none;
}
#emodal-save-edit-button:hover {
    background: #3b8b45;
    box-shadow: 0 4px 12px rgba(59,139,69,0.18);
}

/* Defensive: ensure disabled buttons don't show hover effects */
button:disabled, .button[disabled] {
    pointer-events: none;
    opacity: 0.5;
}