/* checklist.css - Modern and Simple Checklist Stylesheet */

:root {
  --primary: #008cff;
  --accent: #00cf79;
  --bg: #f7faff;
  --card: #ffffff;
  --border: #e0e6ef;
  --text: #222;
  --text-light: #6a7c91;
  --checked: #ccd6e0;
  --shadow: 0 2px 10px rgba(60, 90, 150, 0.06);
  --radius: 12px;
}

body, .checklist-root {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 2rem;
}

/* --- Tab Styles --- */
.tabs {
    max-width: 480px;
    margin: 1rem auto;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.tab {
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.tab:hover {
    color: var(--primary);
}
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.checklist-wrapper {
  max-width: 480px;
  margin: 1rem auto 2rem; /* Adjusted margin for tabs */
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
}

.checklist-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1.3rem;
  color: var(--primary);
}

.checklist-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item-empty {
    color: var(--text-light);
    padding: 1rem 0;
    text-align: center;
}

.checklist-checkbox {
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--primary);
  border-radius: 4px;
  display: grid;
  place-items: center;
  margin-right: 1rem;
  flex-shrink: 0;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.checklist-checkbox:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.checklist-checkbox:checked::after {
  content: '';
  display: block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 2px;
  background: #fff;
}

.checklist-label {
  flex: 1;
  font-size: 1.08rem;
  color: var(--text);
  cursor: pointer;
}

.checklist-item.completed .checklist-label {
  color: var(--text-light);
  text-decoration: line-through;
}

.item-comment {
    color: #888;
    font-style: italic;
    margin-left: 0.5rem;
}

.note-input {
    margin-left: auto;
    min-width: 80px;
    border: 1px solid var(--border);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
}

.category-wrapper {
  margin-top: 2rem;
}

.category-wrapper:first-child {
  margin-top: 0;
}

.category-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

/* Responsive design */
@media (max-width: 540px) {
  .checklist-wrapper {
    padding: 1.2rem 0.8rem;
    margin-top: 0.5rem;
  }
  body, .checklist-root {
    padding: 1rem;
  }
  .tabs {
      gap: 0.2rem;
  }
  .tab {
      padding: 0.6rem 0.8rem;
  }
}
