/* #####################################################################
   MONARCH DESIGN SYSTEM v0.7
   MODULE: Lists
   PURPOSE: Native and custom reusable list components.
   DEPENDENCIES: colors.php, fonts.css, layout.css
   ##################################################################### */

/* ---------- Base Lists ---------- */

ul,
ol {
    margin: 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.45rem;
    padding-left: 0.2rem;
}

li:last-child {
    margin-bottom: 0;
}

ul ul,
ul ol,
ol ul,
ol ol {
    margin-top: 0.45rem;
    margin-bottom: 0;
}

/* ---------- Native Marker Variants ---------- */

.list-circle {
    list-style-type: circle;
}

.list-square {
    list-style-type: square;
}

.list-decimal {
    list-style-type: decimal;
}

.list-alpha {
    list-style-type: lower-alpha;
}

.list-roman {
    list-style-type: upper-roman;
}

/* ---------- Marker Color Modifiers ---------- */

.list-primary li::marker {
    color: var(--site-color-primary);
    font-weight: var(--fw-bold);
}

.list-secondary li::marker {
    color: var(--site-color-secondary);
    font-weight: var(--fw-bold);
}

.list-accent li::marker {
    color: var(--site-color-accent);
    font-weight: var(--fw-bold);
}

/* ---------- Custom Icon Lists ---------- */

.list-icon {
    margin-left: 0;
    padding-left: 0;
    list-style: none;
}

.list-icon li {
    position: relative;
    padding-left: 1.75rem;
}

.list-icon li::before {
    position: absolute;
    left: 0;
    top: 0;
    width: 1.25rem;
    color: var(--site-color-accent);
    font-weight: var(--fw-bold);
    text-align: center;
}

.list-check li::before {
    content: "✓";
}

.list-task li::before {
    content: "☐";
    color: var(--site-color-secondary);
}

.list-task li.is-complete::before {
    content: "☑";
    color: var(--site-color-primary);
}

.list-task li.is-complete {
    opacity: 0.72;
    text-decoration: line-through;
}

.list-arrow li::before {
    content: "➜";
    color: var(--site-color-secondary);
}

/* ---------- Feature List ---------- */

.list-feature {
    margin-left: 0;
    padding-left: 0;
    list-style: none;
}

.list-feature li {
    padding: 0.75rem 0.9rem;
    border-left: 0.3rem solid var(--site-color-primary);
    background: var(--surface-soft);
}

.list-feature li:nth-child(2) {
    border-left-color: var(--site-color-secondary);
}

.list-feature li:nth-child(3) {
    border-left-color: var(--site-color-accent);
}

/* ---------- Numbered Step List ---------- */

.list-steps {
    margin-left: 0;
    padding-left: 0;
    list-style: none;
    counter-reset: list-step;
}

.list-steps li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    counter-increment: list-step;
    padding-left: 0;
}

.list-steps li::before {
    content: counter(list-step);
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--site-color-primary);
    color: var(--site-color-background);
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
}

/* ---------- Description List ---------- */

.description-list {
    margin: 0;
}

.description-list dt {
    margin-top: 0.85rem;
    color: var(--site-color-accent);
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
}

.description-list dt:first-child {
    margin-top: 0;
}

.description-list dd {
    margin: 0.25rem 0 0;
    padding-left: 1rem;
    border-left: 2px solid var(--site-color-secondary);
}

/* ---------- Showcase labels are defined in utilities.css ---------- */

/* ---------- Showcase Layout ---------- */

.list-showcase {
    display: block;
}

.list-showcase .section-intro {
    max-width: 52rem;
    margin: -0.5rem auto 1.5rem;
    text-align: center;
}

.list-example-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.list-example {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    background: var(--surface-faint);
}

.list-example > :last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .list-example-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .list-example-grid {
        grid-template-columns: 1fr;
    }
}
