/**
 * File Path: assets/css/front/mbs-front-list-layout.css
 * List layout item structure
 * Component of mbs-front.css — extracted Session 94.
 * Enqueued by MBS_Front_Assets with dep: mbs-front.
 */
/* ============================================================================
   List layout — item structure
   Flat rules per CSS-002: appended after all nested blocks.
   DOM: .mbs-wrapper > .mbs-layout-list > .mbs-book-list-item > [.mbs-wrapper(cover) + .mbs-book-info]
   !important on flex/direction overrides any nested-block column rules that may
   apply when native CSS nesting is unsupported by the browser.
   ============================================================================ */

.mbs-wrapper .mbs-layout-list .mbs-book-list-item {
    display: flex !important;
    flex-direction: row !important;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--mbs-border);
    border-radius: 8px;
    background: var(--mbs-card-bg);
    transition: box-shadow 0.2s ease;
}

.mbs-wrapper .mbs-layout-list .mbs-book-list-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Cover renderer's .mbs-wrapper direct child — constrain to fixed cover column */
.mbs-wrapper .mbs-layout-list .mbs-book-list-item > .mbs-wrapper {
    flex: 0 0 150px !important;
    width: 150px !important;
    min-width: 0;
}

/* Scale the cover image to fit its 150px column — explicit flat selectors
   because nested CSS (img, .mbs-cover { width:100% }) may not parse in all browsers */
.mbs-wrapper .mbs-layout-list .mbs-book-list-item > .mbs-wrapper .mbs-cover {
    width: 100%;
    display: block;
}

.mbs-wrapper .mbs-layout-list .mbs-book-list-item > .mbs-wrapper .mbs-cover img {
    width: 100% !important;
    height: auto !important;
    display: block;
    max-width: 100%;
}

.mbs-wrapper .mbs-layout-list .mbs-book-info {
    flex: 1 1 auto;
    min-width: 0;
}

.mbs-wrapper .mbs-layout-list .mbs-book-info h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.mbs-wrapper .mbs-layout-list .mbs-book-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--mbs-text-muted);
    line-height: 1.5;
}

/* FE-016: Dedicated style for the book tagline (mbs_teaser) in list layout items.
   Italic distinguishes it from the plain-text author name above it. */
.mbs-wrapper .mbs-layout-list .mbs-book-info .mbs-book-teaser {
    font-style: italic;
    color: var(--mbs-text-muted, #555);
}

@media (max-width: 480px) {
    .mbs-wrapper .mbs-layout-list .mbs-book-list-item {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
    }
    .mbs-wrapper .mbs-layout-list .mbs-book-list-item > .mbs-wrapper {
        width: 120px !important;
    }
}
