:root {
  --light-blue: #87c4ff;
  --off-white: #d9eee1;
  --light-pink: #fb9ddf;
  --gold: #f77f00;
  --black: #000000;
  --black-light: #444;
  --gray: #888;
  --green: #1b5e20;
  --red: #b00020;
  --pink-dark: #8a0f5c;
  --border: #e5e7eb;
}

/* =========================
Color	Hex	RGB
#89fd89	(137,253,137)
#fb9ddf	(251,157,223)
#d9eee1	(217,238,225)
#87c4ff	(135,196,255)
#81feba	(129,254,186)
   ========================= */

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

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background: linear-gradient(135deg, #87c4ff, #a5d6ff);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--black);
}

.card-container {
  width: 100%;
  max-width: 28.125rem;
  background: var(--off-white);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 0.0625rem solid var(--border);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card-container:hover {
  transform: translate(-0.25rem);
  box-shadow: 0 1.25rem 2.1875rem rgba(0, 0, 0, 0.1);
}

.card-container .view-mode {
  display: block;
  gap: 8rem;
}

.card-container form {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}

.card-container.editing .view-mode {
  display: none;
}

.card-container.editing form {
  display: flex;
}

.task-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
}

.card-container.completed .title,
.card-container.completed .description {
  text-decoration: line-through;
  color: var(--gray);
  opacity: 0.85;
}

.description {
  font-size: 1rem;
  color: var(--black-light);
  line-height: 1.5;
}

.collapsible-section {
  overflow: hidden;
  transform-origin: top;
  transform: scaleY(1);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.collapsible-section.expanded {
  max-height: 31.25rem;
  transform: scaleY(1);
}

.collapsible-section p {
  margin: 0;
}

.expand-toggle {
  background: none;
  border: none;
  color: var(--pink-dark);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  align-self: flex-start;
  padding: 0.25rem 0;
  text-decoration: none;
  transition: color 0.2s;
}

.expand-toggle:hover {
  color: #6b1e44;
  text-decoration: underline;
}

.info-section {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.priority,
.status {
  padding: 0.35rem 0.75rem;
  border-radius: 62.4375rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.priority.high {
  background: #ffe5e5;
  color: var(--red);
}

.priority.medium {
  background: #fff4e5;
  color: var(--gold);
}

.priority.low {
  background: #e6f4ea;
  color: var(--green);
}

.priority-indicator {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.3rem;
}

.priority-indicator.high {
  background: var(--red);
}

.priority-indicator.medium {
  background: var(--gold);
}

.priority-indicator.low {
  background: var(--green);
}

.status.pending {
  background: #f7d4ec;
  color: var(--pink-dark);
}

/* do the var() */
.status.in-progress {
  background: #dbeafe;
  color: #1e40af;
}

.status.done {
  background: #e6f4ea;
  color: var(--green);
}

.status-select,
.priority-select {
  padding: 0.55rem 0.6rem;
  font-size: 0.9rem;
  border: 0.0938rem solid var(--border);
  border-radius: 0.625rem;
  background-color: #ffffff;
  color: var(--black);
  cursor: pointer;
  transition: all 0.2s;
}

.status-select:focus,
.priority-select:focus {
  outline: none;
  border-color: var(--light-blue);
  box-shadow: 0 0 0 0.1875rem rgba(59, 130, 246, 0.1);
}

.date-section {
  font-size: 1rem;
  color: var(--black);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1.2rem 0 2rem 0;
}

.time-remaining {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black-light);
}

.overdue-indicator {
  color: var(--red);
  font-weight: 700;
  font-size: 0.95rem;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-bottom: 1.5rem;
}

.tag {
  padding: 0.35rem 0.85rem;
  background: #f7c1e3;
  color: var(--pink-dark);
  border-radius: 62.4375rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.action-section {
  display: flex;
  gap: 0.75rem;
  margin: 0.25rem;
}

.action-section button {
  flex: 1;
  padding: 0.55rem;
  border-radius: 0.75rem;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-section button:first-child {
  background: var(--light-blue);
  color: #1e3a8a;
}

.action-section button:first-child:hover {
  background: #baddff;
}

.action-section button:last-child {
  background: #b00020;
  color: #ffffff;
}

.action-section button:last-child:hover {
  background: #7f0015;
}

input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--light-blue);
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0.1875rem solid var(--light-blue);
  outline-offset: 0.125rem;
}

input,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 0.0938rem solid var(--border);
  border-radius: 0.75rem;
  box-sizing: border-box;
  font-size: inherit;
  font-family: inherit;
  background-color: white;
  transition: all 0.2s;
}

input:focus,
textarea:focus {
  border-color: var(--light-blue);
  box-shadow: 0 0 0 0.25rem rgba(135, 196, 255, 0.15);
  outline: none;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.4rem;
  display: block;
}

/*Responsiveness*/

@media (min-width: 48rem) {
  .card-container {
    padding: 1.75rem;
  }

  .title {
    font-size: 1.5rem;
  }

  form .info-section {
    flex-direction: column;
    align-items: stretch;
  }
}
