/* Simple Video - storefront */

/* --- responsive player box --- */
.sv-ratio {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.sv-ratio:before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.sv-ratio-4x3:before  { padding-top: 75%; }
.sv-ratio-1x1:before  { padding-top: 100%; }
.sv-ratio-9x16:before { padding-top: 177.78%; }

.sv-ratio > iframe,
.sv-ratio > video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

/* --- thumbnail --- */
.simplevideo-thumb {
    position: relative;
    display: block;
}

/* No sizing here: themes style their own gallery images, and an equally
   specific rule of ours would win by load order and break their layout.
   Thumbnail size is mirrored from a neighbouring photo in JS instead. */
.simplevideo-thumb img {
    display: block;
}

.simplevideo-thumb .sv-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    transition: background .2s ease, transform .2s ease;
    pointer-events: none;
}

.simplevideo-thumb .sv-badge:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -5px;
    border-style: solid;
    border-width: 8px 0 8px 13px;
    border-color: transparent transparent transparent #fff;
}

.simplevideo-thumb:hover .sv-badge {
    background: rgba(0, 0, 0, .8);
    transform: scale(1.08);
}

/* Video covers are 16:9; crop them into whatever tile the theme uses. */
.simplevideo-thumb.sv-thumb-sm img { object-fit: cover; }

.simplevideo-thumb.sv-thumb-sm .sv-badge {
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
}

.simplevideo-thumb.sv-thumb-sm .sv-badge:after {
    margin: -5px 0 0 -3px;
    border-width: 5px 0 5px 8px;
}

/* wrapper added when a theme puts the image straight into the slide */
.sv-box { display: block; }

/* --- inline slide --- */
.sv-player {
    position: relative;
    width: 100%;
}

.sv-player .sv-poster {
    position: relative;
    display: block;
    width: 100%;
    cursor: pointer;
}

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

/* --- modal --- */
body.sv-modal-open {
    overflow: hidden;
}

.sv-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    display: none;
}

.sv-modal.sv-open {
    display: block;
}

.sv-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .85);
}

.sv-modal-dialog {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
}

.sv-modal .sv-ratio-9x16 {
    max-width: 420px;
    margin: 0 auto;
}

.sv-modal-title {
    color: #fff;
    font-size: 16px;
    padding: 0 40px 8px 0;
}

.sv-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    line-height: 32px;
    font-size: 28px;
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
    opacity: .8;
}

.sv-modal-close:hover {
    opacity: 1;
}

@media (max-width: 767px) {
    .sv-modal-dialog {
        width: 94%;
    }

    .sv-modal-close {
        top: -34px;
    }
}

/* --- default theme: video tile inside ul.thumbnails --- */
.thumbnails > li.image-additional .simplevideo-thumb {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
}
