/*
|--------------------------------------------------------------------------
| Stroboplay Media Player
|--------------------------------------------------------------------------
*/


/*
|--------------------------------------------------------------------------
| Editor
|--------------------------------------------------------------------------
*/

.stroboplay-media-player-editor {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    background: #000;
    color: #fff;
    overflow: visible;
}


/*
|--------------------------------------------------------------------------
| Editor heading
|--------------------------------------------------------------------------
*/

.stroboplay-media-player-editor h3 {
    margin: 0 0 10px 0;
    color: inherit;
    font-size: 24px;
}

.stroboplay-media-player-editor > p {
    margin: 0 0 24px 0;
    color: inherit;
}


/*
|--------------------------------------------------------------------------
| IMPORTANT
|
| Gutenberg buttons must remain in normal document flow.
| Never absolutely position .components-button here.
|--------------------------------------------------------------------------
*/

.stroboplay-media-player-editor .components-button {
    position: static;
    top: auto;
    left: auto;
    transform: none;
}


/*
|--------------------------------------------------------------------------
| Slot editor
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 24px 0;
    padding: 20px;
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
    border-radius: 6px;
}


/*
|--------------------------------------------------------------------------
| Slot header
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor > div:first-child {
    position: relative;
}


/*
|--------------------------------------------------------------------------
| Gutenberg controls inside slots
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor .components-base-control {
    width: 100%;
    margin-bottom: 18px;
}

.stroboplay-slot-editor .components-base-control:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| Select controls
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor select {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
}


/*
|--------------------------------------------------------------------------
| Text inputs
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor input[type="text"],
.stroboplay-slot-editor input[type="url"],
.stroboplay-slot-editor textarea {
    width: 100%;
    box-sizing: border-box;
}


/*
|--------------------------------------------------------------------------
| Media buttons
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor .components-button {
    display: inline-flex;
    position: static;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 40px;
    margin: 0 8px 8px 0;
    transform: none;
}


/*
|--------------------------------------------------------------------------
| Remove button
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor .is-destructive {
    margin: 0;
}


/*
|--------------------------------------------------------------------------
| Preview
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor > div[style*="aspect-ratio"] {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    background: #111;
}


/*
|--------------------------------------------------------------------------
| Preview media
|--------------------------------------------------------------------------
*/

.stroboplay-slot-editor video,
.stroboplay-slot-editor img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/*
|--------------------------------------------------------------------------
| Frontend player
|--------------------------------------------------------------------------
*/

.stroboplay-media-player {
    position: relative;
    display: block;
    overflow: hidden;
    box-sizing: border-box;
    background: #000;
    margin: 0 auto;
}


/*
|--------------------------------------------------------------------------
| Rotator
|--------------------------------------------------------------------------
*/

.stroboplay-rotator {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


/*
|--------------------------------------------------------------------------
| Individual media slot
|--------------------------------------------------------------------------
*/

.stroboplay-media-slot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
}


/*
|--------------------------------------------------------------------------
| Active slot
|--------------------------------------------------------------------------
*/

.stroboplay-media-slot.stroboplay-slot-active {
    opacity: 1;
    visibility: visible;
}


/*
|--------------------------------------------------------------------------
| Video
|--------------------------------------------------------------------------
*/

.stroboplay-media-slot video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}


/*
|--------------------------------------------------------------------------
| Images
|--------------------------------------------------------------------------
*/

.stroboplay-media-slot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/*
|--------------------------------------------------------------------------
| Text advertisements
|--------------------------------------------------------------------------
*/

.stroboplay-media-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
    background: #000;
    color: #fff;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 600;
}


/*
|--------------------------------------------------------------------------
| Links
|--------------------------------------------------------------------------
*/

.stroboplay-media-slot-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}


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

@media (max-width: 600px) {

    .stroboplay-media-player-editor {
        padding: 16px;
    }

    .stroboplay-slot-editor {
        padding: 16px;
    }

}