@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #FFEEBC;
  font-family: "Schoolbell", cursive, Arial, Helvetica, sans-serif;
  background-image: url('../images/pom-6_63874229085427.2.jpeg');
  background-size: contain;
  background-attachment: fixed;
}

.todo-heading {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 50%;
  left: 50%;
  right: 50%;
  transform: translate(-50%);
  background-color: #ffeebcf2; /* Creamy yellow with transparency */
  padding: 20px 10px;
  position: relative; /* Needed for pseudo-element positioning */
  isolation: isolate; /* Contains blending effects */
  /* Border & Shadow */
  border: 2px solid  rgba(150, 95, 55, 0.8); /* Matching container's brown */
  border-radius: 0 0 12px 12px;
  box-shadow: 
    inset 0 4px 8px rgba(255, 236, 174, 0.4),
    0 2px 4px rgba(106, 74, 58, 0.1);
  /* Text styling */
  text-shadow: 1px 1px 2px rgba(150, 95, 55, 0.3); /* Soft brown shadow */
  margin-bottom: -2px; /* Connects visually with container */
    margin-left: -1px; /* Compensates for border */
  margin-right: -1px;
}

/* Add a warm glow behind the heading */
.todo-heading::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: linear-gradient(45deg, #ffdf8b, #d4a373);
  z-index: -1;
  border-radius: 10px; /* Slightly larger than heading */
  filter: blur(6px);
  opacity: 0.5;
}

.todo-heading::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 5%;
  width: 90%;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    #965f37 0px,
    #965f37 4px,
    transparent 4px,
    transparent 8px
  );
}

.heading-description {
  font-size: 1.1em;
} 

.container {
  display: flex;
  width: 90%;
  max-width: 1000px;
  margin: 10em auto 0;
  padding: 30px 30px 0 30px;
  background-color: #965f37fa;
  background-image: 
    linear-gradient(rgba(150, 95, 55, 0.9), rgba(150, 95, 55, 0.9)),
    url('data:image/svg+xml;utf8,<svg...>'); /* SVG noise */
  border-radius: 12px;
  border: 2px solid #ffdf8b;
  box-shadow: 
    0 4px 20px rgba(106, 74, 58, 0.6),
    inset 0 0 15px rgba(255, 223, 139, 0.4);
  backdrop-filter: blur(1px) brightness(105%);
  position: relative;
  isolation: isolate;
  transition: 
    height 0.4s ease-out,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden; /* Prevents abrupt jumps */
}

.container.grow-effect {
  transform: scaleY(1.02);
  box-shadow: 0 6px 20px rgba(106, 74, 58, 0.3);
}

.container.shrink-effect {
  transform: scaleY(0.98);
}

.container::before {
  content: "";
  inset: -5px;
  background: linear-gradient(45deg, #ffdf8b, #d4a373);
  z-index: -1;
  border-radius: 16px; /* Slightly larger than container */
  filter: blur(10px);
  opacity: 0.1;
}

.container > .input-section > h2, .container > .tasks-section > h2 {
  color: #FFD8BD;
}

.input-section, .tasks-section {
  width: 100%; /* Take full width of container */
  gap: 20px;
  text-align: center;
  padding: 0 10px;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.input-gif-container {
  text-align: center;
  margin: 20px 0px;
}

.input-gif {
  max-width: 200px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(106, 74, 58, 0.2);
}


/* Touch-friendly elements */
button, 
input[type="checkbox"] {
  min-height: 22px;
  min-width: 22px;
}


.input-section {
  position: relative;
  padding-bottom: 0px;
}

.text-input {
  padding: 15px;
  border-radius: 12px;
  background: #fff8e8; 
  border: 2px solid #6a4a3a;
  color: #5a3a2a; 
  box-shadow: 
  inset 2px 2px 4px rgba(255, 223, 139, 0.3), /* Inner glow */
  0 2px 6px rgba(106, 74, 58, 0.1); /* Subtle outer shadow */
}

.text-input:focus {
  border-color: #d4a373; /* Muted orange-brown (like toast!) */
  box-shadow: 
    inset 0 0 8px rgba(255, 223, 139, 0.5), 
    0 0 12px rgba(212, 163, 115, 0.3);
    outline: none;
    transition: border 0.3s;
}

.text-input::placeholder {
  color: #b8a28a; /* Muted beige-gray */
  font-family: 'Schoolbell', cursive;
  opacity: 0.8;
  font-size: medium;
}

.task-text.completed {
  text-decoration: line-through;
  opacity: 0.7;
  transition: 0.3s;
}

.task-edit-input {
  flex-grow: 1;
  margin: 0 10px;
  display: none; /* Hidden bby default */
}

.edit-mode .task-text,
.edit-mode .js-edit-btn {
  display: none !important; /* Hide text and edit button when editing */
}

.edit-mode .task-edit-input,
.edit-mode .js-save-btn,
.edit-mode .js-cancel-btn {
  display: inline-block !important; /* Show input and save button */
}

.edit-btn, .add-button, .save-btn, .cancel-btn, .delete-btn {
  font-family: "Schoolbell", cursive;
}

.add-button {
  background: #c46a5a;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.edit-btn {
  background: rgb(112, 208, 107);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.save-btn {
  background: green;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.cancel-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.delete-btn {
  background: black;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.task { animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } }

.task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin: 5px 0;
  background: #574336;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 96%;
  border: 2px solid #d4a373;
}

.task-text {
  font-size: 25px;
  word-break: break-word;
  max-width: 60%;
  color: white;
}

.task-content {
  display: flex;
  align-items: center;
  flex-grow: 1;
  min-width: 0;
}

.task-date {
  font-size: 0.8em;
  color: #d5c3c3;
  margin-left: 8px;
  font-style: italic;
}

.task-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 8px;
  border-radius: 12px;
  font-size: 12px;
  color: white;
  font-weight: bold;
  white-space: nowrap;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  transition: all 0.2s ease;
}

/* For when the tag has content and is not hidden */

.task-tag:not(:empty) {
  max-width: 200px;
  padding: 2px 8px;
  margin: 0 8px;
}

.task-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.task-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  margin-right: -7px;
  font-size: 15.5px;
  color: white;
  font-weight: bold;
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.tag-dropdown {
  margin-right: 8px;
  padding: 2px;
}

/* Scroll bar editing */

::-webkit-scrollbar {
  width: 10px;
  background: #FFEEBC;
}
::-webkit-scrollbar-thumb {
  background: #6a4a3a; /* Brown thumb */
  border-radius: 10px;
}

/* Responsive media query */

@media (max-width: 768px) {
  .task-text {
    font-size: 18px;
  }
  .container {
    padding: 20px 15px;
  }
}