/* Video Composer — Custom Styles */

/* Sidebar */
.sidebar {
    transition: width 0.3s ease;
}

.sidebar-link {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Movie Cards */
.movie-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

/* Accordion in Editor */
.accordion-button:not(.collapsed) {
    background-color: #e7f0ff;
    color: #0d6efd;
}

/* Responsive Video */
video {
    border-radius: 0.5rem;
}

/* Badge customization */
.badge {
    font-weight: 500;
}

/* Toast customization */
.toast {
    min-width: 300px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Image preview in editor */
.position-relative .btn-danger {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.position-relative:hover .btn-danger {
    opacity: 1;
}

/* Video Preview UI */
.preview-sticky {
    position: sticky;
    top: 2rem;
    z-index: 100;
}

.video-preview-shell {
    width: 100%;
    margin-bottom: 1.5rem;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.2);
    container-type: inline-size;
}

/* TikTok: 1080x1920 (9:16) */
.preview-tiktok {
    width: 100%;
    padding-top: 177.77%; /* 16 / 9 = 1.777 */
    position: relative;
}

/* YouTube: 1920x1080 (16:9) */
.preview-youtube {
    width: 100%;
    padding-top: 56.25%; /* 9 / 16 = 0.5625 */
    position: relative;
}

.preview-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.preview-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.preview-tiktok .preview-image-box {
    position: absolute;
    /* (60, 480) in 1080x1920 is ~5.5% and 25% */
    top: 5%;
    left: 5.555%; /* 60/1080 */
    right: 5.555%;
    height: 50%; /* 960/1920 */
    background: #000;
    border-radius: 4.6cqw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-tiktok .preview-image-box img.preview-img-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(15px) brightness(0.7);
    transform: scale(1.1); /* Prevent edge bleeding */
}

.preview-tiktok .preview-image-box img.preview-img-sharp {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
}

.preview-tiktok .preview-title {
    position: absolute;
    /* Title at y=1620 is ~84.4% from top */
    top: 70%;
    width: 100%;
    text-align: center;
    color: #FFD700;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 800;
    font-size: 5.6cqw; /* 60/1080 -> 5.55% */
    line-height: 1.1;
    padding: 0 8%;
    -webkit-text-stroke: 0.37cqw #222222; /* 4/1080 -> 0.37% */
    text-shadow: 0.37cqw 0.37cqw 0.4cqw rgba(0,0,0,0.8);
    word-break: break-word;
}

.preview-tiktok .preview-logo {
    position: absolute;
    /* Logo at y=1480 is ~77.1% from top */
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    height: 9.3cqw; /* 100/1080 -> 9.25% */
    opacity: 0.9;
}


/* YouTube Preview simple style */
.preview-youtube .preview-image-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.preview-youtube .preview-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

