/* =============================================
   Checklist page styles
   ============================================= */

.single-checklists .crumbs {
	margin-top: 30px;
}
.single-checklist {
	background: #fff;
}


/* --- Header --- */
.checklist-header {
	margin: 36px 0;
}

/* --- Meta (author / updated / rating) --- */
.checklist-meta{
    margin: 18px 0 22px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.checklist-meta__rating{
    padding-top: 2px;
}

.checklist-page__title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.3;
}

.checklist-page__excerpt {
    margin-bottom: 20px;
    color: #555;
}

/* --- Controls --- */
.checklist-controls {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
	justify-content: space-between;
}


.checklist-controls button {
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: opacity .2s;
}

.checklist-btn-all-check:hover,
.checklist-btn-all-reset:hover {
    opacity: .85;
}

.checklist-btn-all-reset {
    background: #f0f0f0;
    color: #444;
}

/* --- Progress bar --- */
.checklist-progress {
    margin-bottom: 8px;
}

.checklist-progress__bar {
    height: 8px;
    background: #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.checklist-progress__fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3a6bff, #6ec1e4);
    border-radius: 8px;
    transition: width .4s cubic-bezier(.4,0,.2,1);
}

.checklist-progress__label {
    font-size: 13px;
    color: #777;
}

/* --- Category block --- */
.checklist-category {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}

.checklist-category:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.checklist-category__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    background: #f8f9ff;
    border-bottom: 1px solid #e8e8e8;
    transition: background .2s;
}

.checklist-category__header:hover {
    background: #eef1ff;
}

.checklist-category__header.all-done {
    background: #edfdf5;
    border-bottom-color: #b2f0d0;
}

/* Category custom checkbox icon */
.checklist-category__checkbox-wrap {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 2px solid #3a6bff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
    position: relative;
}

.checklist-category__header.all-done .checklist-category__checkbox-wrap {
    background: #22c55e;
    border-color: #22c55e;
}

.checklist-category__check-icon::after {
    content: '';
    display: block;
    width: 6px;
    height: 11px;
    border: 2.5px solid transparent;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: border-color .2s;
}

.checklist-category__header.all-done .checklist-category__check-icon::after {
    border-color: #fff;
}

.checklist-category__name {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.checklist-category__counter {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
}

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

.checklist-item {
    border-bottom: 1px solid #f2f2f2;
    transition: background .15s;
}

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

.checklist-item:hover {
    background: #fafbff;
}

.checklist-item__label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    cursor: pointer;
    margin: 0;
}

/* Hide native checkbox */
.checklist-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkmark */
.checklist-item__checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
    position: relative;
}

.checklist-item__checkmark::after {
    content: '';
    display: block;
    width: 5px;
    height: 10px;
    border: 2.5px solid transparent;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
    transition: border-color .15s;
}

.checklist-checkbox:checked ~ .checklist-item__checkmark {
    background: #3a6bff;
    border-color: #3a6bff;
}

.checklist-checkbox:checked ~ .checklist-item__checkmark::after {
    border-color: #fff;
}

/* Strikethrough when checked */
.checklist-item__text {
    flex: 1;
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    transition: color .2s, text-decoration .2s;
}

.checklist-checkbox:checked ~ .checklist-item__checkmark + .checklist-item__text,
.checklist-item.is-done .checklist-item__text {
    text-decoration: line-through;
    color: #aaa;
}

/* Priority badge */
.priority-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.priority-high:hover   { background: #fee2e2; color: #ef4444; }
.priority-medium:hover { background: #fef3c7; color: #d97706; }
.priority-low:hover    { background: #dcfce7; color: #16a34a; }

/* Done state on list item */
.checklist-item.is-done {
    background: #fafffe;
}

/* Completed page celebration */
.checklist-body.all-complete::before {
    content: '🎉 ' attr(data-complete-msg);
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #22c55e;
    animation: fadeIn .5s ease;
	margin-bottom: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Post content below checklist */
.checklist-post-content {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 600px) {
    .checklist-page__title { font-size: 22px; }
    .checklist-category__name { font-size: 15px; }
    .checklist-item__label { padding: 11px 14px; gap: 10px; }
    .priority-badge { display: none; }
}
