/* 
 * Sticky Video Banner Pro - Styles 
 */

#svb-widget-container {
    --svb-border-radius: 16px;
    --svb-shadow: 0 10px 30px rgba(0,0,0,0.3);
    --svb-z-index: 999999;
    --svb-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: system-ui, -apple-system, sans-serif;
}

/* Modal Overlay (Hidden by default) */
.svb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: calc(var(--svb-z-index) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

/* Base Wrapper */
.svb-content-wrapper {
    position: fixed;
    border-radius: var(--svb-border-radius);
    overflow: hidden;
    box-shadow: var(--svb-shadow);
    z-index: var(--svb-z-index);
    transition: var(--svb-transition);
    background: #000;
}

/* Layout Container */
.svb-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Video Side */
.svb-video-side {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svb-video-side video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Default for sticky (no black bars) */
}

/* Loading Spinner */
.svb-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    margin-left: -16px;
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    border-top-color: #fff;
    animation: svb-spin 1s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}
@keyframes svb-spin {
    to { transform: rotate(360deg); }
}
.svb-is-playing .svb-loading-spinner {
    display: none;
}

/* Video Overlay Trigger (for clicking to expand) */
.svb-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 5;
}

/* Banner Side */
.svb-banner-side {
    display: none;
    width: 35%;
    height: 100%;
    background: transparent;
    position: relative;
    flex-direction: column;
}

.svb-banner-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    text-decoration: none;
    overflow: hidden;
}

.svb-banner-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.svb-banner-link:hover .svb-banner-image {
    transform: scale(1.03);
}

.svb-buy-btn-container {
    position: relative;
    width: 100%;
    margin-top: 24px;
    text-align: center;
    box-sizing: border-box;
}

.svb-buy-btn {
    display: block;
    background: var(--svb-btn-bg, #e63946);
    color: var(--svb-btn-text, #ffffff);
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border: 1px solid var(--svb-btn-stroke, transparent);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.svb-buy-btn:hover {
    background: var(--svb-btn-hover, #d62828);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
    color: var(--svb-btn-text, #ffffff);
}

/* Buttons */
.svb-btn {
    position: absolute;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: background 0.2s, transform 0.2s;
    font-size: 20px;
    line-height: 1;
}

.svb-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* =========================================
   Mode: Sticky
   ========================================= */
.svb-mode-sticky .svb-content-wrapper {
    bottom: var(--svb-bottom-offset, 20px);
    left: 20px; /* Bottom Left as requested */
    width: 300px;
    height: 420px;
}

.svb-mode-sticky .svb-btn-close-modal {
    display: none;
}

.svb-mode-sticky .svb-btn-close-sticky {
    top: 10px;
    right: 10px;
}

.svb-mode-sticky .svb-btn-expand {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 48px;
    height: 48px;
    opacity: 0;
    visibility: hidden;
}

.svb-mode-sticky .svb-content-wrapper:hover .svb-btn-expand {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* =========================================
   Mode: Modal
   ========================================= */
.svb-mode-modal .svb-modal-overlay {
    opacity: 1;
    visibility: visible;
}

.svb-mode-modal .svb-content-wrapper {
    /* Centered */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1100px;
    aspect-ratio: 16/9;
    height: auto;
    max-height: 90vh;
    border-radius: 24px; /* More rounded for modern look */
    
    /* Glassmorphism Effect */
    background: rgba(30, 30, 30, 0.35); /* Translucent dark */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.svb-mode-modal .svb-video-side video {
    object-fit: contain; /* Don't crop in expanded mode */
}

.svb-mode-modal .svb-video-side {
    width: 65%;
    background: transparent; /* Allow glass to show through */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.svb-mode-modal .svb-banner-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px;
    box-sizing: border-box;
}

.svb-mode-modal .svb-video-overlay {
    display: none; /* Let video controls work natively */
}

.svb-mode-modal .svb-btn-close-sticky,
.svb-mode-modal .svb-btn-expand {
    display: none;
}

.svb-mode-modal .svb-btn-close-modal {
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    font-size: 24px;
}
.svb-mode-modal .svb-btn-close-modal:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsive adjustments for Modal */
@media (max-width: 768px) {
    .svb-mode-modal .svb-layout {
        flex-direction: column;
    }
    .svb-mode-modal .svb-video-side,
    .svb-mode-modal .svb-banner-side {
        width: 100%;
        height: 50%;
        border-right: none;
    }
    .svb-mode-modal .svb-content-wrapper {
        aspect-ratio: auto;
        height: 90vh;
    }
}
