/* ── Layout ─────────────────────────────────────────────────────────────────── */

.site-content {
    align-self: center;
    max-width: 100%;
    width: 100%;
}

.ast-container {
    max-width: 100%;
    padding: 0;
}

.site-main {
    width: 100%;
    margin-top: 10px;
    padding-left: 30px;
    padding-right: 30px;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

.entry-header {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 30px !important;
    text-align: center !important;
}

h1 {
    font-size: 36px !important;
    margin-bottom: 0 !important;
    font-weight: bold;
}

h2 {
    font-size: 25px !important;
    margin-bottom: 0 !important;
    font-weight: bold;
}

h3 {
    margin-bottom: 0 !important;
    font-weight: bold;
}

.custom-breadcrumb {
    font-size: 15px;
    line-height: 1;
    margin-bottom: 5px !important;
}


/* ── Edit mode ──────────────────────────────────────────────────────────────── */

/* Hidden by default, visible only in edit mode */
.drag-handle,
.section-drag-handle,
.checklist-item-edit-btn,
.checklist-item-hide-btn,
.checklist-item-delete-btn,
.checklist-section-title-edit-btn,
.checklist-section-delete-btn,
.add-item-to-section-btn,
.add-section-container {
    display: none !important;
}

body.checklist-edit-mode .add-section-container {
    display: block !important;
}

body.checklist-edit-mode .add-item-to-section-btn {
    display: block !important;
}

body.checklist-edit-mode .checklist-section.add-item-open .add-item-to-section-btn {
    display: none !important;
}

body.checklist-edit-mode .drag-handle,
body.checklist-edit-mode .section-drag-handle,
body.checklist-edit-mode .checklist-item-edit-btn,
body.checklist-edit-mode .checklist-item-hide-btn,
body.checklist-edit-mode .checklist-item-delete-btn,
body.checklist-edit-mode .checklist-section-title-edit-btn,
body.checklist-edit-mode .checklist-section-delete-btn {
    display: flex !important;
}


/* Section drag handle */
.section-drag-handle {
    flex-shrink: 0;
    color: #555;
    font-size: 16px;
    cursor: grab;
    padding: 4px 8px 4px 0;
    line-height: 1;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.section-drag-handle:hover {
    color: #000;
}

.section-drag-handle:active {
    cursor: grabbing;
}

/* Section delete button */
.checklist-section-delete-btn, .checklist-section-delete-btn:focus {
    flex-shrink: 0;
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #555;
    font-size: 12px;
    line-height: 1;
    width: 26px;
    height: 26px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    padding: 0;
}

.checklist-section-delete-btn:hover {
    border-color: #e53935;
    color: #e53935;
    background: none;
}

.checklist-section.dragging-section {
    opacity: 0.4;
}

/* In edit mode: hide checkboxes, disable label hover */
body.checklist-edit-mode .checklist-checkbox {
    display: none;
}

body.checklist-edit-mode .checklist-item-label {
    cursor: default;
    pointer-events: none;
}

body.checklist-edit-mode .checklist-item-label:hover {
    background: none;
}

/* Hidden items are visible (with strikethrough) in edit mode */
body.checklist-edit-mode .checklist-item.hidden {
    display: flex;
}

body.checklist-edit-mode .checklist-item.hidden .checklist-item-text {
    text-decoration: line-through;
    color: #555;
}

/* ── Action buttons ─────────────────────────────────────────────────────────── */

.checklist-actions-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.checklist-actions-bar--bottom {
    margin-top: 30px;
    margin-bottom: 0;
}

/* ── Share page banner ───────────────────────────────────────────────────────── */

.checklist-share-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 14px;
    color: #1e40af;
    flex-wrap: wrap;
}

.checklist-share-banner-text {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.checklist-share-banner-expiry {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.8;
}

.checklist-share-banner-link {
    flex-shrink: 0;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
    white-space: nowrap;
}

.checklist-share-banner-link:hover {
    text-decoration: underline;
}

#checklist-share-result {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -16px auto 24px;
    max-width: 560px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 12px;
}

#checklist-share-url-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 13px;
    color: #15803d !important;
    outline: none !important;
    cursor: text;
    min-width: 0;
    box-shadow: none !important;
}

#checklist-share-result-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
}

#edit-checklist-btn.active,
.edit-checklist-btn-mirror.active {
    background: #333;
    color: #fff;
}

.checklist-action-btn, .checklist-action-btn:focus {
    padding: 9px 20px;
    border-radius: 8px;
    border: 2px solid #333;
    background: #333;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.checklist-action-btn:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

.checklist-action-btn--outline, .checklist-action-btn--outline:focus {
    background: transparent;
    color: #333;
}

.checklist-action-btn--outline:hover {
    background: #333;
    color: #fff;
}


/* ── Checklist sections ─────────────────────────────────────────────────────── */

.checklist-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.checklist-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: rgba(50, 50, 93, 0.08) 0px 4px 12px -2px;
}

.checklist-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.checklist-section-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    flex: 1;
}

.checklist-section-title-edit-btn, .checklist-section-title-edit-btn:focus {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #555;
    font-size: 14px;
    line-height: 1;
    width: 26px;
    height: 26px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
    padding: 0;
    margin-right: 4px;
}

.checklist-section-title-edit-btn:hover {
    border-color: #333;
    color: #555;
    background: none;
}

.checklist-section-title-input {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 2px 8px !important;
    flex: 1;
    outline: none;
    background: #fff;
    line-height: 1.8;
    height: unset !important;
    margin-right: 4px;
}

.checklist-section-title-input:focus {
    border: 1px solid #333 !important;
}

/* ── Checklist items ────────────────────────────────────────────────────────── */

.checklist-items {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checklist-item {
    border-radius: 8px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
}

.checklist-item.checked {
    opacity: 0.55;
}

.checklist-item.hidden {
    display: none;
}

.checklist-item.dragging {
    opacity: 0.4;
}

.checklist-item-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-weight: normal;
    margin: 0;
    flex: 1;
}

.checklist-item-label:hover {
    background: #f7f7f7;
}

/* ── Drag handle ─────────────────────────────────────────────────────────────── */

.drag-handle {
    flex-shrink: 0;
    align-self: center;
    color: #555;
    font-size: 16px;
    cursor: grab;
    padding: 4px 6px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.drag-handle:hover {
    color: #000;
}

.drag-handle:active {
    cursor: grabbing;
}

/* ── Edit button ─────────────────────────────────────────────────────────────── */

.checklist-item-edit-btn, .checklist-item-edit-btn:focus {
    flex-shrink: 0;
    align-self: center;
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #555;
    font-size: 14px;
    line-height: 1;
    width: 26px;
    height: 26px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    margin-right: 4px;
    padding: 0;
}

.checklist-item-edit-btn:hover {
    border-color: #333;
    color: #555;
    background: none;
}

/* ── Hide button ─────────────────────────────────────────────────────────────── */

.checklist-item-hide-btn, .checklist-item-hide-btn:focus {
    flex-shrink: 0;
    align-self: center;
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #555;
    font-size: 16px;
    line-height: 1;
    width: 26px;
    height: 26px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    margin-right: 4px;
    padding: 0;
}

.checklist-item-hide-btn:hover {
    border-color: #333;
    color: #555;
    background: none;
}

/* ── Delete item button ───────────────────────────────────────────────────────── */

.checklist-item-delete-btn, .checklist-item-delete-btn:focus {
    flex-shrink: 0;
    align-self: center;
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #555;
    font-size: 12px;
    line-height: 1;
    width: 26px;
    height: 26px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    margin-right: 4px;
    padding: 0;
}

.checklist-item-delete-btn:hover {
    border-color: #e53935;
    color: #e53935;
    background: none;
}

/* ── Inline text edit input ──────────────────────────────────────────────────── */

.checklist-item-text-input {
    flex: 1;
    font-size: 15px;
    padding: 2px 8px !important;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #000;
    background: #fff;
    outline: none;
    line-height: 1.8;
    height: unset !important;
}

.checklist-item-text-input:focus {
    border: 1px solid #333 !important;
}

/* ── Checkbox ────────────────────────────────────────────────────────────────── */

.checklist-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: #4caf50;
    cursor: pointer;
}

.checklist-item-text {
    font-size: 15px;
    line-height: 1.5;
    color: #000;
    transition: text-decoration 0.15s;
}

.checklist-item.checked .checklist-item-text {
    color: #999;
}

/* ── Add item button & form ─────────────────────────────────────────────────── */

.add-item-to-section-btn, .add-item-to-section-btn:focus {
    background: none;
    border: 1px dashed #aaa;
    border-radius: 8px;
    color: #555;
    font-size: 13px;
    padding: 7px 14px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    margin-top: 10px;
    transition: border-color 0.2s, color 0.2s;
}

.add-item-to-section-btn:hover {
    border-color: #333;
    color: #111;
    background: none;
}

.add-item-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.add-item-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

.add-item-input:focus {
    border-color: #333;
    outline: none;
}

.add-item-form-actions {
    display: flex;
    gap: 8px;
}

.add-item-submit-btn,
.add-item-cancel-btn {
    padding: 7px 16px;
    border-radius: 7px;
    border: 1px solid #333;
    background: #333;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.add-item-cancel-btn {
    background: transparent;
    color: #333;
}

.add-item-cancel-btn:hover {
    background: #f0f0f0;
}

/* ── Add section ────────────────────────────────────────────────────────────── */

.add-section-container {
    max-width: 700px;
    margin: 20px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#add-section-btn {
    background: none;
    border: 1px dashed #aaa;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    padding: 10px;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.2s, color 0.2s;
}

#add-section-btn:hover {
    border-color: #333;
    color: #111;
}

#add-section-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#new-section-title {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

#new-section-title:focus {
    border-color: #333;
    outline: none;
}

/* ── Partner CTA ────────────────────────────────────────────────────────────── */

.partner-recommendation {
    max-width: 700px;
    margin: 30px auto 0;
    font-size: 13px;
    font-style: italic;
    font-weight: 500;
    text-align: center;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
}

.partner-recommendation a {
    color: #d62b00;
}

.partner-recommendation a:hover {
    color: red;
}

/* ── Description & comments ─────────────────────────────────────────────────── */

.content-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 60px;
    margin-bottom: 50px;
}

.content-wrapper {
    border: 1px solid rgb(235, 235, 235);
    border-radius: 20px;
    max-width: 768px;
    width: 100%;
}

.entry-content {
    width: 100%;
    padding: 20px 40px;
}

.comment-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgb(235, 235, 235);
}

/* ── Other checklists ───────────────────────────────────────────────────────── */

.other-content-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 30px 60px;
}

.other-checklist-colls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.other-checklist-colls > h2 {
    grid-column: 1 / -1;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000;
    margin-bottom: 4px !important;
}

.other-checklist-coll {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 18px;
    text-align: left;
    transition: box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}

.other-checklist-coll:hover {
    box-shadow: rgba(50, 50, 93, 0.1) 0px 6px 16px -4px;
    border-color: #bbb;
}

.other-checklist-coll h3 {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    line-height: 1.4;
    text-decoration: underline;
}

.other-checklist-coll h3 a {
    color: #000;
    text-decoration: none;
}

.other-checklist-coll h3 a:hover {
    text-decoration: underline;
}

.other-checklist-coll .post-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 0;
}

.other-checklist-colls-see-all {
    grid-column: 1 / -1;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
}

.other-checklist-colls-see-all:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .other-checklist-colls {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .other-checklist-colls {
        grid-template-columns: 1fr;
    }
}

/* ── Print styles ───────────────────────────────────────────────────────────── */

@media print {
    .custom-breadcrumb,
    .checklist-actions-bar,
    .checklist-actions-bar--bottom,
    .drag-handle,
    .checklist-item-edit-btn,
    .checklist-item-hide-btn,
    .add-item-to-section-btn,
    .add-item-form,
    .add-section-container,
    .partner-recommendation,
    .content-container,
    .other-content-container {
        display: none !important;
    }

    .site-main {
        padding: 0 !important;
        margin: 0 !important;
    }

    .entry-header {
        text-align: left !important;
        margin-bottom: 16px !important;
    }

    .checklist-container {
        max-width: 100% !important;
        gap: 16px;
    }

    .checklist-section {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        break-inside: avoid;
    }

    .checklist-section-title {
        font-size: 14px !important;
        border-bottom: 1px solid #ccc;
        padding-bottom: 4px;
        margin-bottom: 6px !important;
    }

    .checklist-items {
        margin: 0 !important;
    }

    .checklist-item {
        border-bottom: 1px dotted #ddd;
    }

    .checklist-item-label {
        padding: 6px 4px !important;
    }

    .checklist-item-text {
        font-size: 13px !important;
    }

}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .site-main {
        padding-left: 10px;
        padding-right: 10px;
    }
}
