/**
 * CM Storytelling Toolkit - Anthology Frontend Styles
 * Shortcode-Output: Sortierte Beitragsliste im literarischen Stil
 *
 * @since 3.4.0
 */

/* =============================================
   Anthology List Container
   ============================================= */
.cm-anthology__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =============================================
   Single Item
   ============================================= */
.cm-anthology__item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e8e0d4;
    transition: background-color 0.2s ease;
}

.cm-anthology__item:last-child {
    border-bottom: none;
}

.cm-anthology__item:hover {
    background-color: #fef9f3;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 4px;
}

/* =============================================
   Number
   ============================================= */
.cm-anthology__number {
    font-family: var(--cm-font-family, 'Merriweather', Georgia, serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: #c4956a;
    min-width: 2rem;
    text-align: right;
    line-height: 1.4;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

/* =============================================
   Thumbnail
   ============================================= */
.cm-anthology__thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.cm-anthology__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =============================================
   Content Area
   ============================================= */
.cm-anthology__content {
    flex: 1;
    min-width: 0;
}

/* =============================================
   Title
   ============================================= */
.cm-anthology__title {
    font-family: var(--cm-font-family, 'Merriweather', Georgia, serif);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.35rem;
}

.cm-anthology__title a {
    color: #2c1810;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cm-anthology__title a:hover {
    color: #c4956a;
}

/* =============================================
   Excerpt
   ============================================= */
.cm-anthology__excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #5a4a3a;
    margin: 0;
}

/* =============================================
   Reverse Display (Erschienen in...)
   ============================================= */
.cm-anthology__belongs {
    font-family: var(--cm-font-family-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 0.85rem;
    color: #8b7355;
    margin-top: var(--cm-spacing-md, 1.5rem);
    padding-top: var(--cm-spacing-sm, 1rem);
    border-top: 1px solid #e8e0d4;
}

.cm-anthology__belongs-label {
    font-weight: 600;
    margin-right: 0.35rem;
}

.cm-anthology__belongs a {
    color: #c4956a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cm-anthology__belongs a:hover {
    color: #2c1810;
    text-decoration: underline;
}

/* =============================================
   Empty State
   ============================================= */
.cm-anthology__empty {
    padding: 2rem;
    text-align: center;
    color: #8b7355;
    font-style: italic;
    font-size: 0.95rem;
}

/* =============================================
   Dark Mode
   ============================================= */
@media (prefers-color-scheme: dark) {
    .cm-anthology__item {
        border-bottom-color: #3d3428;
    }

    .cm-anthology__item:hover {
        background-color: #2a1f10;
    }

    .cm-anthology__number {
        color: #d4a86a;
    }

    .cm-anthology__title a {
        color: #f0d9b5;
    }

    .cm-anthology__title a:hover {
        color: #d4a86a;
    }

    .cm-anthology__excerpt {
        color: #b8a896;
    }

    .cm-anthology__belongs {
        color: #a08a6e;
        border-top-color: #3d3428;
    }

    .cm-anthology__belongs a {
        color: #d4a86a;
    }

    .cm-anthology__belongs a:hover {
        color: #f0d9b5;
    }
}

/* =============================================
   Zen Mode Dark
   ============================================= */
body.zen-active .cm-anthology__item {
    border-bottom-color: #3d3428;
}

body.zen-active .cm-anthology__item:hover {
    background-color: #2a1f10;
}

body.zen-active .cm-anthology__number {
    color: #d4a86a;
}

body.zen-active .cm-anthology__title a {
    color: #f0d9b5;
}

body.zen-active .cm-anthology__title a:hover {
    color: #d4a86a;
}

body.zen-active .cm-anthology__excerpt {
    color: #b8a896;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 480px) {
    .cm-anthology__item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .cm-anthology__thumbnail {
        width: 60px;
        height: 60px;
    }

    .cm-anthology__number {
        font-size: 1.1rem;
        min-width: 1.5rem;
    }
}

/* =============================================
   Print
   ============================================= */
@media print {
    .cm-anthology__item:hover {
        background-color: transparent;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .cm-anthology__title a {
        color: #000;
    }

    .cm-anthology__thumbnail {
        display: none;
    }
}

/* =============================================
   Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .cm-anthology__item,
    .cm-anthology__title a,
    .cm-anthology__belongs a {
        transition: none;
    }
}
