/* ============================================================
   What's New modal deck + Current Promotions slider
   Both are Swiper instances. Ported from the v1-refresh prototype
   and adapted for Bootstrap 3.
   ============================================================ */

/* ---------- What's New modal ---------- */

/* Bootstrap 3 has no .modal-dialog-centered, so size and offset by hand. */
.whats-new .modal-dialog {
    width: 620px;
    max-width: 94%;
    margin: 60px auto;
}

.whats-new .modal-content {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    overflow: hidden;
}

.whats-new .modal-header {
    border-bottom: 1px solid #e6e8ef;
    padding: 14px 18px;
}

.whats-new .modal-title {
    margin: 0;
    font-size: 20px;
}

.whats-new .modal-body {
    padding: 0;
}

/* min-width:0 is load-bearing. Without it the deck sizes to its content and
   Swiper measures a container thousands of px wide, giving every slide that
   width. The fixed height stops Swiper collapsing to 0 without autoHeight. */
.poster-deck {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 74vh;
    max-height: 860px;
    overflow: hidden;
    background: #01053f;
}

.poster-deck .swiper-slide {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 100%;
}

.poster {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.poster img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

/* ---------- Shared arrow + dot styling ---------- */

.deck-arrow {
    position: absolute;
    top: 50%;
    z-index: 11;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #01053f;
    font-size: 18px;
    line-height: 46px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    -webkit-transition: background-color .2s ease, color .2s ease;
    transition: background-color .2s ease, color .2s ease;
}

.deck-arrow:hover,
.deck-arrow:focus {
    background: #01053f;
    color: #fff;
    outline: none;
}

.deck-arrow--prev {
    left: 14px;
}

.deck-arrow--next {
    right: 14px;
}

/* Swiper's .swiper-pagination-bullets.swiper-pagination-horizontal sets its own
   left/width, so these need equal specificity to win. */
.whats-new .poster-deck .deck-pagination,
.promo-slider-wrap .promo-pagination {
    position: absolute;
    left: 50%;
    bottom: 14px;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 11;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(1, 5, 63, .55);
}

.deck-pagination .swiper-pagination-bullet,
.promo-pagination .swiper-pagination-bullet {
    width: 20px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .45);
    opacity: 1;
    margin: 0 3px !important;
    -webkit-transition: background-color .25s ease;
    transition: background-color .25s ease;
}

.deck-pagination .swiper-pagination-bullet-active,
.promo-pagination .swiper-pagination-bullet-active {
    background: #f5c451;
}

/* ---------- Current Promotions slider ---------- */

.promo-slider-wrap {
    position: relative;
    padding-bottom: 56px;
}

.promo-slider {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.promo-slider .swiper-slide {
    height: auto;
}

.promo-poster {
    display: block;
    height: 420px;
    padding: 10px;
    background: #f4f6fa;
    border: 1px solid #e6e8ef;
    border-radius: 8px;
    line-height: 0;
    text-align: center;
    -webkit-transition: box-shadow .2s ease, -webkit-transform .2s ease;
    transition: transform .2s ease, box-shadow .2s ease;
}

a.promo-poster:hover,
a.promo-poster:focus {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
}

/* Portrait flyers: contain, never crop. */
.promo-poster img {
    display: inline-block;
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* The promotions arrows sit below the posters rather than over them, so the
   slide edges stay clickable. */
.promo-slider-wrap .deck-arrow {
    top: auto;
    bottom: 0;
    -webkit-transform: none;
    transform: none;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    background: #fff;
    border: 1px solid #e6e8ef;
}

.promo-slider-wrap .deck-arrow--prev {
    left: 50%;
    margin-left: -96px;
}

.promo-slider-wrap .deck-arrow--next {
    right: 50%;
    margin-right: -96px;
}

.promo-slider-wrap .promo-pagination {
    bottom: 8px;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
    .poster-deck {
        height: 66vh;
        max-height: 620px;
    }

    .whats-new .modal-dialog {
        margin: 30px auto;
    }

    .whats-new .modal-header {
        padding: 12px 14px;
    }

    .whats-new .modal-title {
        font-size: 17px;
    }

    .deck-arrow {
        width: 38px;
        height: 38px;
        line-height: 38px;
        font-size: 16px;
    }

    .deck-arrow--prev {
        left: 8px;
    }

    .deck-arrow--next {
        right: 8px;
    }

    .promo-poster {
        height: 320px;
    }
}
