/* ── Featured Entity Card — frontend styles ──────────────────────────────── */

.cp-entity-card {
    --card-radius: 8px;
    --card-border: 1px solid #dcdcde;
    --card-shadow: 0 1px 4px rgba(0,0,0,.08);
    --card-gap:    20px;
    --thumb-size:  100px;

    display: flex;
    flex-direction: row;
    gap: var(--card-gap);
    padding: 20px;
    background: #fff;
    border: var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    container-type: inline-size;
    max-width: 680px;
}

/* ── Media (thumbnail / placeholder) ── */

.cp-entity-card__media {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    text-decoration: none;
}

.cp-entity-card__image {
    display: block;
    width: var(--thumb-size);
    height: var(--thumb-size);
    object-fit: cover;
    border-radius: calc(var(--card-radius) - 2px);
}

.cp-entity-card__media--placeholder {
    width: var(--thumb-size);
    height: var(--thumb-size);
    border-radius: calc(var(--card-radius) - 2px);
    background: #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-entity-card__media--placeholder .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #a7aaad;
}

/* ── Body ── */

.cp-entity-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-entity-card__eyebrow {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #787c82;
}

.cp-entity-card__eyebrow .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

/* Type accent colours */
.cp-entity-card--person .cp-entity-card__eyebrow { color: #1d4ed8; }
.cp-entity-card--place  .cp-entity-card__eyebrow { color: #15803d; }
.cp-entity-card--source .cp-entity-card__eyebrow { color: #7e22ce; }

.cp-entity-card__title {
    margin: 0;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.3;
}

.cp-entity-card__title a {
    color: inherit;
    text-decoration: none;
}

.cp-entity-card__title a:hover {
    text-decoration: underline;
}

/* ── Meta fields ── */

.cp-entity-card__meta {
    margin: 4px 0 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cp-entity-card__meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: .875em;
    line-height: 1.5;
}

.cp-entity-card__meta-row dt {
    font-weight: 600;
    color: #3c434a;
    white-space: nowrap;
}

.cp-entity-card__meta-row dt::after {
    content: ':';
}

.cp-entity-card__meta-row dd {
    margin: 0;
    color: #3c434a;
}

/* ── Excerpt ── */

.cp-entity-card__excerpt {
    margin: 4px 0 0;
    font-size: .875em;
    color: #50575e;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── CTA link ── */

.cp-entity-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: .875em;
    font-weight: 600;
    text-decoration: none;
    color: #2271b1;
}

.cp-entity-card__cta:hover {
    text-decoration: underline;
}

/* ── Compact style ── */

.cp-entity-card--compact {
    --thumb-size: 64px;
    padding: 14px;
    gap: 14px;
}

.cp-entity-card--compact .cp-entity-card__excerpt {
    display: none;
}

/* ── Minimal style (no image) ── */

.cp-entity-card--minimal .cp-entity-card__media {
    display: none;
}

.cp-entity-card--minimal {
    padding: 14px 18px;
}

/* ── Narrow container: stack vertically ── */

@container (max-width: 350px) {
    .cp-entity-card {
        flex-direction: column;
    }

    .cp-entity-card__media {
        width: 100%;
    }

    .cp-entity-card__image,
    .cp-entity-card__media--placeholder {
        width: 100%;
        height: 160px;
    }
}

/* ── WordPress align classes ── */

.wp-block-chroniclepress-featured-card.alignleft  { float: left; margin-right: 2em; }
.wp-block-chroniclepress-featured-card.alignright { float: right; margin-left: 2em; }
.wp-block-chroniclepress-featured-card.aligncenter { margin: 0 auto; }
.wp-block-chroniclepress-featured-card.alignwide,
.wp-block-chroniclepress-featured-card.alignfull  { max-width: none; }