/**
 * ot-downloads styles — based on SDM's sdm-fancy-2-styles.css but
 * rebuilt for modern wp:columns layouts.
 *
 * Key change vs SDM: no `float: left` and no `width: 30%` override.
 * SDM's CSS assumed a hand-built 3-up grid; in modern Gutenberg the
 * parent column block controls width, so the item just needs to fill
 * its container (with a sensible max).
 *
 * Class names match SDM exactly so any custom CSS in the theme that
 * targets .sdm_fancy2_item / .sdm_fancy2_download_dl_link / etc. keeps
 * working unchanged after cutover.
 *
 * Loaded conditionally — only on pages that actually contain a download
 * shortcode or block (see inc/assets.php).
 */

.sdm_fancy2_item {
    box-sizing: border-box;
    margin: 1em auto;            /* centered inside its column with vertical breathing room */
    padding: 0;
    border: 1px solid #BBBEC9;
    width: 100%;
    max-width: 280px;            /* won't grow uncomfortably wide on broad templates */
}

/* Legacy SDM class — was 30% width for hand-rolled 3-up grids. Modern
   wp:columns handles layout, so we no-op this to stop it shrinking the
   item below readable size in narrow columns. Kept declared so any
   theme CSS targeting it doesn't suddenly become orphaned. */
.sdm_fancy2_grid {
    /* width override intentionally removed */
}

.sdm_fancy2_wrapper {
    padding: 15px;
    margin: 0;
}

.sdm_fancy2_download_thumbnail {
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.sdm_fancy2_download_thumbnail img {
    max-width: 100%;
}

.sdm_fancy2_download_title {
    font-family: Bitter, Georgia, serif;
    margin: 10px 0;
    text-align: center;
}

.sdm_fancy2_download_title a {
    text-decoration: none !important;
    border: none;
    margin: 0;
    padding: 0;
}

.sdm_fancy2_more_details_link_section {
    text-align: center;
    margin-bottom: 10px;
}

.sdm_fancy2_download_link {
    text-align: center;
    margin-top: 0.75em;
}

/* Button colour / border / hover deliberately NOT styled here — the
   download <a> also carries .wp-block-button__link so the site-wide
   pill style (B125, theme style.css) takes over. Keeping a single
   button look across the whole site means future button redesigns
   apply automatically without touching this file. */

/* "More details" secondary link still uses the old SDM look since it's
   not the primary action and shouldn't compete visually with the main
   download button. */
.sdm_fancy2_more_details_link {
    border: 2px solid #2D3140;
    color: #2D3140;
    padding: 5px 10px;
    display: inline-block;
    text-decoration: none !important;
}
.sdm_fancy2_more_details_link:hover {
    color: #FFF;
    background-color: #2D3140;
}

.sdm_fancy2_download_size,
.sdm_fancy2_download_version,
.sdm_fancy2_download_date {
    margin: 5px 0;
    text-align: center;
}

.sdm_clear_float {
    clear: both;
}

/* Mobile */
@media only screen and (max-width: 480px) {
    .sdm_fancy2_item {
        margin: 5px 10px 5px 0;
        border: 1px solid #BBBEC9;
        float: left;
        width: 95%;
    }
}
