/*
 * Checklist-specific styles live here so the reusable modal/card CSS stays generic.
 * This separate stylesheet was created because checklist detail pages need custom
 * progress indicators, ordered list formatting, and checkbox layout that do not
 * belong to the shared card/modal component styling.
 */

.progress-card {
    margin: 1rem 0 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #16a34a;
    transition: width 0.3s ease;
}

.progress-status {
    margin-top: 0.75rem;
    color: #475569;
}

/* ==========================================================================
   Checklist Item Cards
   ========================================================================== */

.checklist-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Slight elevation on hover to indicate interactivity */
.checklist-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Optional styling for when a card's checkbox is marked completed */
.checklist-card.is-complete {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: none;
}

.checklist-card.is-complete h3 {
    text-decoration: line-through;
    color: #64748b;
}

/* Apply consistent checkbox styling across cards and summary lists */
.checklist-card input[type="checkbox"],
.checklist-summary input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #16a34a; /* Matches your green progress-fill */
    flex-shrink: 0;       /* Prevents checkbox from squeezing on smaller screens */
}

/* Ensure strong section subheadings stay visually distinct within cards */
.checklist-card p strong {
    color: #1e293b;
    font-weight: 600;
}

/* Ensure flex alignment for the label inside the summary list */
.checklist-summary .checklist-item label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    padding: 0.35rem 0;   /* Adds touch-friendly spacing between list items */
}

/* Strike-through effect when checked in the summary section */
.checklist-summary .checklist-item.is-complete span {
    text-decoration: line-through;
    color: #64748b;
    opacity: 0.85;
}

.checklist-overview {
    margin: .25rem 0;
    list-style: none;
}

.checklist-overview ul,
.checklist-summary ul,
.resource-body ul,
.checklist-item,
.checklist-item li {
    list-style: none !important;
    padding-left: 0 !important;
    margin: .25rem !important;
}

.checklist-overview ol,
.checklist-summary ol,
.resource-body ol,
.completion-goal ol {
    list-style: decimal !important;
    padding-left: 1.0rem !important;
    margin: 0.05rem 0 0 !important;
    list-style-position: outside;
}

.checklist-overview li,
.completion-goal li,
.resource-body li,
.checklist-item li {
    margin-bottom: 0.05rem;
    list-style: none !important;
    padding-left: 0.25rem;
}

.checklist-overview .checklist-list {
    margin: 0 !important;
}

.checklist-overview .checklist-list .checklist-item {
    margin: 0 !important;
    margin-bottom: 0.05rem !important;
    padding: 0 !important;
}

.checklist-overview .checklist-list .checklist-item label {
    margin: 0;
    padding: 0;
}

.checklist-overview li::marker,
.resource-body li::marker,
.checklist-item li::marker,
.completion-goal li::marker {
    content: "";
}

.checklist-overview ol li,
.checklist-summary ol li,
.resource-body ol li,
.completion-goal ol li {
    list-style: decimal !important;
    margin-bottom: 0.15rem;
    padding-left: 0.5rem;
}

.checklist-overview ol li::marker,
.checklist-summary ol li::marker,
.resource-body ol li::marker,
.completion-goal ol li::marker {
    content: counter(list-item) ".";
    font-variant-numeric: tabular-nums;
    margin-right: 0.5rem;
}

.completion-goal li {
    margin-bottom: 0.15rem;
}

.checklist-overview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: transparent;
    border-left: none;
}

.completion-goal {
    margin-top: 0.5rem;
    padding: 1rem;
    background: transparent;
    border-left: none;
}

.checklist-item label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checklist-item input {
  width: 1.1rem;
  height: 1.1rem;
}

.checklist-item.is-complete span {
  text-decoration: line-through;
  opacity: 0.7;
}

.checklist-content p {
margin-top: 1.25rem;
margin-bottom: 0.5rem;
}

.ai-prompt-assistant {
    border-left: 4px solid var(--primary-color);
}

.ai-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.ai-prompt-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ai-prompt-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.4;
    background: #f8fafc;
}

.ai-provider-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-provider-links .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-provider-logo {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex: 0 0 auto;
}

.ai-copy-icon {
    margin-right: 0.3rem;
}

@media (max-width: 576px) {
    .ai-prompt-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ai-prompt-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}
