/* Flip Books cards reuse the AV books classes (video-box, video-buttons, play-buttons).
   Only the differences live here. */

/* Keeps the first series heading clear of the fixed site header. */
#flipbooks
{
    padding-top:90px;
    /* The header banner above (#imageSlider, shared with the A-V page) is floated; start below it. */
    clear:both;
}

/* The banner already clears the fixed header, so no extra gap below it.
   Under 821px the banner is hidden (css/1200.css) and the padding above is kept. */
@media (min-width:821px)
{
    #top-section ~ #flipbooks
    {
        padding-top:1px;
    }
}

/* Optional text below the banner (Admin > Flip Books > PAGE TEXT); same look as the A-V page text. */
.flipbook-page-text
{
    clear:both;
    padding-top:20px;
    font-size:20px;
    text-align:center;
}

.flipbook-page-text ul,
.flipbook-page-text ol
{
    display:inline-block;
    text-align:left;
}

/* No banner image at all: the text takes the banner's place below the fixed site header. */
.flipbook-page-text.no-banner
{
    padding-top:190px;
}

.flipbook-page-text.no-banner ~ #flipbooks
{
    padding-top:1px;
}

/* Under 821px the banner is hidden, so the text needs room below the fixed header. */
@media (max-width:820px)
{
    .flipbook-page-text,
    .flipbook-page-text.no-banner
    {
        padding-top:110px;
        font-size:16px;
    }

    .flipbook-page-text ~ #flipbooks
    {
        padding-top:0;
    }
}

/* Part number smaller and lighter than the title, so the title stands out (client request). */
.flipbook-box .video-title.flipbook-part-number
{
    font-size:12.5px;
    font-weight:400;
    color:#555;
}

/* AV boxes are positioned by the AV page; this anchors the button row to each card here. */
.flipbook-box
{
    position:relative;
}

/* Book covers are portrait, at full size (client asked to undo the 30% reduction).
   Used on the Flip Books, Series and Levels pages. */
.flipbook-box .video-box-image img
{
    display:block;
    max-width:191px;
    max-height:233px;
    object-fit:contain;
    -webkit-user-drag:none;
    user-select:none;
}

/* The image box grows with the taller cover so it does not overlap the part number and title. */
.flipbook-box .video-box-image
{
    height:auto;
    min-height:200px;
}

/* Same box as the AV .play-video-button, so the square play icon is not stretched.
   (That AV class is not reused because its click handler plays videos.) */
.flipbook-play-button
{
    font-size:12px;
    display:-ms-grid;
    display:grid;
    -ms-grid-columns:35px calc(100% - 35px);
    grid-template-columns:35px calc(100% - 35px);
}

.flipbook-box .short-description .flipbook-rich-text
{
    width:100%;
    /* Smaller, condensed type so the card text takes fewer lines (client request). */
    font-family:'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
    font-size:12.5px;
    line-height:1.3;
}

/* Formatted text from the admin editor (short description and More Details). */
.flipbook-rich-text p,
.flipbook-rich-text ul,
.flipbook-rich-text ol
{
    margin:0;
}

.flipbook-rich-text ul,
.flipbook-rich-text ol
{
    padding-left:20px;
}

.flipbook-rich-text ul li
{
    list-style:disc;
}

.flipbook-rich-text ol li
{
    list-style:decimal;
}

.flipbook-rich-text a
{
    text-decoration:underline;
}

/* Same size as the AV book image in the details popup. */
.flipbook-details-content #video-details-image img
{
    display:block;
    max-width:190px;
    max-height:230px;
    object-fit:contain;
}

/* Long descriptions scroll inside the popup instead of running off the screen. */
.flipbook-details-content .flipbook-details-text
{
    max-height:50vh;
    overflow-y:auto;
    padding-right:8px;
    overscroll-behavior:contain;
}

/* Same as #videos in css/900.css, so phones get the AV books width. */
@media (max-width:900px)
{
    #flipbooks
    {
        width:96% !important;
    }

    /* Phones give the popup image a 200px row (css/900.css); keep the cover inside it. */
    .flipbook-details-content #video-details-image img
    {
        max-height:190px;
        margin:0 auto;
    }

    .flipbook-details-content #video-details-description
    {
        margin-top:16px;
    }

    .flipbook-details-content .flipbook-details-text
    {
        max-height:calc(100vh - 430px);
        min-height:120px;
    }
}

.flipbook-message
{
    margin-top:30px;
    padding:14px;
    background:#fff1f1;
    color:#a11;
    text-align:center;
}

.flipbook-empty
{
    margin:100px 0;
    text-align:center;
}
