/* CSS Reset */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
  margin: 0;
  padding: 0;
}

/* Remove list styles */
ol,
ul {
  list-style: none;
}

/* Remove default anchor styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Remove default button styles */
button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

/* Remove outline on focus */
*:focus {
  outline: none;
}

/* Add CSS reset specific to each browser */
/* Chrome, Safari, Edge, Opera */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: inherit;
  opacity: 0.5;
}

/* Firefox */
input::-moz-placeholder,
textarea::-moz-placeholder {
  color: inherit;
  opacity: 0.5;
}

/* Internet Explorer 10-11 */
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: inherit;
  opacity: 0.5;
}

/* Internet Explorer 6-9 */
input::-ms-input-placeholder,
textarea::-ms-input-placeholder {
  color: inherit;
  opacity: 0.5;
}

body {
  box-sizing: border-box;
  width: 90vw;
  background-color: rgb(10, 10, 10);
  color: #ececec;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: "Inter", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 auto;
}

.headline h1 {
  font-size: 8rem;
  font-weight: 900;
  margin-bottom: 24px;
  background: url("h1.jpg");
  background-size: cover;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 8rem;
}

.toDoContainer {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 64px;
}

.item-container {
  width: 100%;
  display: grid;
  grid-template-columns: 50px 6fr 1fr 1fr 1fr 50px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #ececec10;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: transform 0.3s ease-in-out, margin 0.3s ease-in-out;
}

.item-container.deleting {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.icon-container,
.title-container,
.duration-container,
.date-container,
.status-container,
.deleteToDo {
  display: flex;
  align-items: center;
}

.title-container,
.duration-container,
.date-container,
.status-container {
  /* width: 150px; Fixed width for the fields */
  white-space: normal; /* Allow text to wrap */
  overflow: hidden;
  text-overflow: ellipsis;
  height: auto; /* Allow height to adjust */
  max-height: -webkit-fit-content;
  max-height: -moz-fit-content;
  max-height: fit-content; /* Set a maximum height */
}

.editing {
  background-color: #ececec3a;
  padding: 5px; /* Optional: Add some padding for better visual feedback */
  border-radius: 4px; /* Optional: Add rounded corners */
  overflow-y: auto;
  white-space: normal; /* Allow text to wrap */
  max-height: -webkit-fit-content;
  max-height: -moz-fit-content;
  max-height: fit-content; /* Set a maximum height */
}

.toDoIcon i {
  color: #ececec;
  width: 40px;
  height: 40px;
  font-size: 40px;
}

.deleteToDo i {
  transition: all 0.3s ease-in-out;
}

.deleteToDo i:hover {
  cursor: pointer;
  color: rgb(160, 4, 4);
}

.newToDo {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

button {
  color: #ececec;
  background-color: transparent;
  border: 1px solid #ececec3a;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 1.2rem;
  align-self: flex-start;
  margin-top: 24px;
  transition: all 0.3s ease-in-out;
}

button:hover {
  background-color: #ececec3a;
}
/* Mobile Styles */
@media (max-width: 768px) {
  .headline h1 {
    font-size: 5rem; /* Smaller font size for headlines */
    line-height: 4rem; /* Smaller line height for headlines */
  }

  .toDoContainer {
    row-gap: 4px;
  }

  .item-container {
    /* grid-template-columns: 1fr; Stack the columns vertically */
    padding: 8px;
    /* grid-template-columns: 20px 3fr 1fr 1fr 1fr 20px; */
    grid-template-columns: 1fr 1fr;
    align-items: center;
    row-gap: 4px;
  }

  .title-container,
  .duration-container,
  .date-container,
  .status-container {
    width: auto; /* Auto width for better mobile fit */
    white-space: normal; /* Allow text to wrap */
    margin-bottom: 8px; /* Space between items */
  }

  .duration-container {
    flex-wrap: wrap;
  }

  .newToDo {
    justify-content: center; /* Center the button on mobile */
  }

  button {
    width: 100%; /* Full-width button */
    margin-top: 16px; /* Increase top margin */
  }
}
