﻿/* =========================
   SLIDE EDITOR PAGE LAYOUT
   ========================= */

.BEC-slide-editor-page {
    /* Fill viewport without fighting scrollbars */
    height: 100vh;
    width: 100vw;

    display: flex;
    flex-direction: column;
    align-items: center; /* center horizontally */
    padding-top: 50px;
    box-sizing: border-box;
    position: fixed;
    overflow: hidden; /* this page is not meant to scroll */
}

/* Title row container */
.BEC-slide-editor {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.BEC-slide-editor-title-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px;
}

.BEC-slide-editor-title {
    width: 90%;
    font-size: 20px;
    padding: 5px;
}


/* =========================
   WORKSPACE + SQUARES
   ========================= */

/* Workspace region under the title — fills remaining height */
.BEC-slide-editor-workspace {
    flex: 1;
    width: 100%;
    /*background: white;*/ /* visual debugging */
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size; /* for cqw/cqh units */
}

/* Largest centered square that fits inside workspace */
.BEC-editor-big-square {
    aspect-ratio: 1;
    width: min(100cqw, 100cqh); /* max square inside workspace */
    background: skyblue;
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size; /* small square can size off this */
    overflow:hidden;
    position:relative;
}

/* Inner square = 75% of big square */
.BEC-editor-small-square {
    aspect-ratio: 1;
    width: min(75cqw, 75cqh);
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* so the wrapper can take full width/height */
    /* no centering rules here on purpose; AspectRatioContainer self-centers */
}


/* =========================
   ASPECT RATIO CONTAINER
   ========================= */

/* Wrapper that centers the aspect box inside whatever parent it’s in */
.BEC-aspect-wrapper {
    width: 100%;
    flex: 1;
    position: relative; /* key */
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Both horizontal & vertical boxes behave the same;
   aspect-ratio comes from your inline style. */
.BEC-aspect-box-horizontal,
.BEC-aspect-box-vertical {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    margin: auto; /* center in both directions */

    max-width: 100%;
    max-height: 100%;
    /* no explicit width/height: aspect-ratio + max-constraints decide size */

    background: orange; /* just for debugging */
}
/*
        flex: 1;
    width: 100%; 
display: flex;
flex-direction: column;
justify-content: center;
align-items: center; 
align-items: stretch;
background: red;
*/

/* Horizontal-ish (wider than tall) aspect content */
/*.BEC-aspect-box-horizontal {
    width: 100%;
    height: auto;
    max-height: 100%;
    background: orange;
}*/

/* Vertical-ish (taller than wide) aspect content */
/*.BEC-aspect-box-vertical {
    height: 100%;
    width: auto;
    max-width: 100%;
    background: orange;
}*/


/* =========================
   IMAGE SELECTOR STUFF
   ========================= */

.BEC-slide-image-selectimage {
    width: 100%;
    height: 100%;
    cursor: pointer;
    object-fit: contain;
}

.BEC-slide-image-selector-holder {
    display: block;
    flex-direction: row;
    margin-top: 10px;
}
.BEC-slide-image-selector-tile {
    width: 20vh;
    height: 20vh;
    max-height: 100px;
    max-width: 150px;
    position: relative;
    display: inline-block;
    border: 1.5px solid black;
    border-radius: 5px;
}

.BEC-slide-list-name {
    display: flex;
    font-weight: 600;
    height:100%;
    align-content:center;
    align-items:center;
    flex-grow:1;
}
.BEC-slide-list-image {
    height: 45px;
    border: 1px solid black;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* lets .BEC-aspect-wrapper fill */
}

.BEC-slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}
.BEC-slide-image-mask {
    position: absolute;
    inset: 0;
    overflow:hidden;
    background: orange; /* or orange */
}
.BEC-slide-image-ghost {
    width: 100%;
    height: 100%;
    opacity:0.3;
    position:absolute;
    z-index:0;
}
.BEC-slide-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.Bec-slides-drag-active {
    width: 100%;
    height: 10px;
    border: 1px solid blue;
    background-color: #f0f0f0; /* Base background color */
    background-image: repeating-linear-gradient(45deg, transparent, transparent 9px, rgba(0,0,0,0.1) 9px, rgba(0,0,0,0.1) 10px), repeating-linear-gradient(-45deg, transparent, transparent 9px, rgba(0,0,0,0.1) 9px, rgba(0,0,0,0.1) 10px);
    background-size: 20px 20px; /* Size of the repeating pattern unit */
    cursor: copy !important;
}
    .Bec-slides-drag-active:hover {
        background-color: rgba(0,0,255,0.05);
    }
    .Bec-slides-drag-inactive {
        width: 100%;
        height: 0px;
    }

/* Main page container */
.BEC-slideshow-recorder-page {
    min-height: calc(100vh - 57px); /* desktop header size */
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;

}

/* Override for narrow / mobile layouts */
@media (max-width: 639.98px) {
    .BEC-slideshow-recorder-page {
        min-height: calc(100vh - 117px); /* mobile header size */
    }
}
.BEC-slideshow-recorder-title-bar {
    padding-top:10px;
    width:100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center; /* optional */
    font-weight:bold;
}

.BEC-slideshow-recorder-control-bar {
    padding: 10px;
    background: #D1531D;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;

}

/* Staging fills remaining space */
.BEC-slideshow-recorder-staging-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch; /* stretch horizontally */
    background: black;
    cursor:pointer;
}

/* Image container */
.BEC-slideshow-recorder-image-container {
    flex: 1;
    width: 100%; /* prevents width:0 collapse */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* OK now that width is defined */
    align-items: stretch;
/*    background: red;*/
}

.BEC-slideshow-recorder-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Start overlay */
.BEC-slideshow-recorder-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* Triangle play button */
.BEC-slideshow-recorder-play-button {
    position: absolute;
    inset: 0;
    background-color:black;
    opacity:0.7;
    display:flex;

}
.BEC-slideshow-recorder-play-button-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size:400%
}
.BEC-slideshow-btn-record{
    background-color:white;
    color:red;
    border: 3px solid black;
}
.BEC-slideshow-btn-play {
    background-color: white;
    color: green;
    border: 3px solid black;

}

/* =========================
   SPINNER ANIMATION
   ========================= */
.bec-oi-spin {
    animation: bec-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes bec-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
.BEC-slideshow-fullscreen {
    position: fixed;
    inset: 0;
    background-color:black;
    display:flex;
}