/* Checklist Modal Styling */
.modal-overlay {
    display: none;
    position: fixed !important;
    z-index: 20000 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#checklistModalContent {
    max-width: 500px;
    width: 90%;
    background: white;
    display: flex;
    /* Ensure it is not set to none by global styles */
    opacity: 1;
    /* Safety check */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    /* OVERRIDE global .modal-content padding */
    overflow: hidden;
    /* Ensure header is flush */
    /* For absolute close btn */
    visibility: visible;
}

.checklist-header {
    background: linear-gradient(135deg, #626F47, #4C5735);
    padding: 25px 30px;
    /* Increased padding for better look */
    border-radius: 0;
    /* Flush with container due to overflow:hidden */
    color: white;
}

.checklist-progress-container {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.checklist-progress-bar {
    height: 100%;
    background: #F0BB78;
    /* Warm Orange */
    width: 0%;
    transition: width 0.4s ease;
}

.checklist-body {
    padding: 30px;
    /* Restore padding for content */
    max-height: 60vh;
    overflow-y: auto;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    /* Horizontal padding removed to align with edges better? No, let's keep vertical */
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

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

.checklist-item.completed span {
    text-decoration: line-through;
    color: #94a3b8;
}

.checklist-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #626F47;
}

.checklist-input-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.checklist-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 0.95rem;
}

.checklist-input:focus {
    border-color: #626F47;
}

.checklist-add-btn {
    background: #626F47;
    color: white;
    border: none;
    padding: 0 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.checklist-add-btn:hover {
    background: #4C5735;
}

.checklist-delete-btn {
    margin-left: auto;
    color: #ef4444;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 5px;
}

.checklist-item:hover .checklist-delete-btn {
    opacity: 1;
}

/* Close Button Positioned Top Right of Modal */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    z-index: 10;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}