/* MEDIPHARM Super App v1.3.23 — book-list title & download-card layout.
   Loaded after the legacy content/library bundles, only on Super App book routes.
   No change to file gateway, membership logic, cover sizing, taxonomy or search. */

/* Book cards: the title's actual full text determines its height. The old bundle
   used -webkit-line-clamp:2 and overflow:hidden, producing trailing ellipses. */
.syh-book-app .syh-archive-card-copy h2 {
    display:block!important;
    width:100%;
    min-width:0!important;
    min-height:0!important;
    max-height:none!important;
    margin:8px 0 12px;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
    -webkit-line-clamp:unset!important;
    line-clamp:unset!important;
    -webkit-box-orient:initial!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    hyphens:none!important;
    font-size:clamp(15px,1.02vw,17px)!important;
    line-height:1.45!important;
}
.syh-book-app .syh-archive-card-copy h2 a {
    display:inline!important;
    max-width:none!important;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
}
/* Book pages do not need a repeated teaser below the visible complete title. */
.syh-book-app .syh-library-book-grid .syh-archive-card-copy > div,
.syh-book-app .syh-library-guest-book-grid .syh-archive-card-copy > div,
.syh-book-app .syh-library-browser-archive .syh-archive-card-copy > div {
    display:none!important;
}
/* Card height expands as needed for long titles; keep the action after the title. */
.syh-book-app .syh-archive-card {min-height:0!important;height:auto!important;}
.syh-book-app .syh-archive-card-copy {min-width:0!important;height:auto!important;max-height:none!important;}

/* Download block — explicitly assign all three children to grid cells. In the
   legacy rules the file icon spans two rows and the action spans all columns;
   this has produced a collapsed single-column stack on real book pages. */
.syh-book-app .syh-book-content .syh-file-card {
    display:grid!important;
    grid-template-columns:54px minmax(0,1fr) max-content!important;
    grid-template-rows:auto!important;
    align-items:center!important;
    gap:14px 16px!important;
    width:min(680px,100%)!important;
    max-width:100%!important;
    min-width:0!important;
    margin:28px auto!important;
    padding:18px 20px!important;
    box-sizing:border-box!important;
}
.syh-book-app .syh-book-content .syh-file-card > .syh-file-icon {
    grid-column:1!important;
    grid-row:1!important;
    width:54px!important;
    height:54px!important;
    min-width:0!important;
    margin:0!important;
    align-self:center!important;
}
.syh-book-app .syh-book-content .syh-file-card > .syh-file-copy {
    display:flex!important;
    flex-direction:column!important;
    grid-column:2!important;
    grid-row:1!important;
    justify-self:stretch!important;
    align-self:center!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
}
.syh-book-app .syh-book-content .syh-file-card > .syh-file-copy strong,
.syh-book-app .syh-book-content .syh-file-card > .syh-file-copy small {
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
}
.syh-book-app .syh-book-content .syh-file-card > a {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    grid-column:3!important;
    grid-row:1!important;
    justify-self:end!important;
    align-self:center!important;
    width:auto!important;
    max-width:none!important;
    min-width:140px!important;
    min-height:46px!important;
    padding:0 20px!important;
    margin:0!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
}
/* Sidebar download lists remain two-column, with a full-width action below. */
.syh-book-app .syh-download-panel .syh-file-card {
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}
.syh-book-app .syh-download-panel .syh-file-card > .syh-file-icon {
    grid-column:1!important;
    grid-row:1!important;
    width:42px!important;
    height:42px!important;
}
.syh-book-app .syh-download-panel .syh-file-card > .syh-file-copy {
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
}
.syh-book-app .syh-download-panel .syh-file-card > a {
    grid-column:1/-1!important;
    grid-row:2!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    white-space:normal!important;
}
@media (max-width:700px) {
    .syh-book-app .syh-book-content .syh-file-card {
        grid-template-columns:48px minmax(0,1fr)!important;
        grid-template-rows:auto auto!important;
        gap:12px!important;
        padding:15px!important;
    }
    .syh-book-app .syh-book-content .syh-file-card > .syh-file-icon {
        grid-column:1!important;
        grid-row:1!important;
        width:48px!important;
        height:48px!important;
    }
    .syh-book-app .syh-book-content .syh-file-card > .syh-file-copy {
        grid-column:2!important;
        grid-row:1!important;
    }
    .syh-book-app .syh-book-content .syh-file-card > a {
        grid-column:1/-1!important;
        grid-row:2!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        white-space:normal!important;
    }
    .syh-book-app .syh-archive-card-copy h2 {
        font-size:15.5px!important;
        line-height:1.45!important;
    }
}
