/**
 * assets/css/abstract.css: the abstract box at the head of an article (3.0.1).
 *
 * Three looks, chosen in Theme Options (Articles, Abstract box) or per box:
 * summary (a panel), card and ruled. Colours are the site's colour scheme
 * through the tokens below, always.
 *
 * @package Bismika_Allahuma
 * @since   3.0.1
 */

:root {
	--bma-accent-color: var(--bm-accent, #4267b2);
	--bma-title-color: var(--bm-ink, #1f2a44);
	--bma-text-color: var(--bm-text, #333);
	--bma-bg-color: var(--bm-light, #f0f3f9);
	--bma-border-radius: var(--bm-r-card, 12px);
	--bma-font-family: var(--bm-sans, system-ui, sans-serif);
}

/* ═══════════════════════════════════════════════════════════════
   BASE — shared across all styles
   ═══════════════════════════════════════════════════════════════ */

.bismika-abstract {
    margin: 24px 0 16px;
    position: relative;
    font-family: var(--bma-font-family);
    transition:
        transform      0.22s ease,
        box-shadow     0.22s ease,
        border-color   0.18s ease,
        border-width   0.18s ease,
        background-color 0.18s ease,
        filter         0.22s ease,
        outline-color  0.18s ease;
}

/* ═══════════════════════════════════════════════════════════════
   CARD
   Raised white card, the theme's card border and shadow
   ═══════════════════════════════════════════════════════════════ */

.bismika-abstract.bismika-abstract--card {
    padding: 22px 24px;
    border-radius: var(--bma-border-radius);
    border: 1px solid var(--bm-border, rgba(0, 0, 0, 0.08));
    background-color: #fff;
    background-image: none;
    box-shadow: var(--bm-shadow, 0 2px 5px rgba(0, 0, 0, 0.2));
}

@media (hover: hover) {
    .bismika-abstract--hover.bismika-abstract--card:hover {
        transform: translateY(-3px);
        box-shadow: var(--bm-shadow-lift, 0 10px 24px rgba(0, 0, 0, 0.16));
    }
}

.bismika-abstract--card .bismika-abstract__title {
    font-size: 1.0625rem;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   RULED
   Accent bar on the left, rule under the title
   ═══════════════════════════════════════════════════════════════ */

.bismika-abstract.bismika-abstract--ruled {
    padding: 18px 22px;
    border-radius: 0 var(--bma-border-radius) var(--bma-border-radius) 0;
    border: none;
    border-left: 5px solid var(--bma-accent-color);
    background-color: var(--bma-bg-color);
    background-image: none;
    box-shadow: none;
}

@media (hover: hover) {
    .bismika-abstract--hover.bismika-abstract--ruled:hover {
        transform: translateX(4px);
        box-shadow: inset 7px 0 0 var(--bma-accent-color);
        filter: brightness(1.015);
    }
}

.bismika-abstract--ruled .bismika-abstract__title {
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bma-accent-color);
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   PANEL (summary)
   The theme's panel: light band, panel radius, no frame
   ═══════════════════════════════════════════════════════════════ */

.bismika-abstract.bismika-abstract--summary {
    padding: 24px 28px;
    border-radius: var(--bm-r-panel, 16px);
    border: none;
    background-color: var(--bma-bg-color);
    background-image: none;
    box-shadow: none;
}

@media (hover: hover) {
    .bismika-abstract--hover.bismika-abstract--summary:hover {
        background-color: color-mix(in srgb, var(--bma-bg-color) 90%, white 10%);
        box-shadow:
            0 0 0 4px color-mix(in srgb, var(--bma-bg-color) 60%, transparent),
            0 8px 20px rgba(0, 0, 0, 0.06);
    }
}

.bismika-abstract--summary .bismika-abstract__title {
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   TITLE — shared base, overrides per style above
   ═══════════════════════════════════════════════════════════════ */

.bismika-abstract__title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;
    color: var(--bma-title-color);
    letter-spacing: -0.01em;
}

/* In an article the title is often an h2: the article's heading spacing stays outside the box. */
.bismika-prose .bismika-abstract .bismika-abstract__title {
    margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SUBTITLE
   ═══════════════════════════════════════════════════════════════ */

.bismika-abstract__subtitle {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 10px;
    color: var(--bma-accent-color);
    font-style: italic;
}


/* ═══════════════════════════════════════════════════════════════
   CONTENT
   ═══════════════════════════════════════════════════════════════ */

.bismika-abstract__content {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--bma-text-color);
    text-align: justify;
}


.bismika-abstract__content p:last-child,
.bismika-abstract__content li:last-child {
    margin-bottom: 0;
}

/* ── List styles ───────────────────────────────────────────────────
   Explicitly set list styles so theme resets cannot strip them.
   Unordered lists use the accent colour for bullet markers.
   ─────────────────────────────────────────────────────────────── */

.bismika-abstract__content ul,
.bismika-abstract__content ol {
    margin: 0.5em 0 0.75em 0;
    padding-left: 1.5em;
    text-align: left;
}

.bismika-abstract__content ul {
    list-style: none;
    padding-left: 1.25em;
}

.bismika-abstract__content ul li {
    position: relative;
    padding-left: 0.5em;
    margin-bottom: 0.5em;
}

.bismika-abstract__content ul li::before {
    content: '';
    position: absolute;
    left: -1em;
    top: 0.55em;
    width: 0.45em;
    height: 0.45em;
    border-radius: 50%;
    background-color: var(--bma-bullet-color, var(--bma-accent-color));
    flex-shrink: 0;
}

.bismika-abstract__content ol {
    list-style: decimal;
}

.bismika-abstract__content ol li {
    margin-bottom: 0.5em;
    padding-left: 0.25em;
}

.bismika-abstract__content ol li::marker {
    color: var(--bma-bullet-color, var(--bma-accent-color));
    font-weight: 600;
}

/* Nested lists */
.bismika-abstract__content ul ul,
.bismika-abstract__content ol ol,
.bismika-abstract__content ul ol,
.bismika-abstract__content ol ul {
    margin: 0.35em 0 0.35em 0;
}

.bismika-abstract__content ul ul li::before {
    width: 0.35em;
    height: 0.35em;
    background-color: color-mix(in srgb, var(--bma-bullet-color, var(--bma-accent-color)) 55%, transparent);
}
