/**
 * PārthaOS Preview Engine v5.6
 */

/* Scroll tease window */
.preview-scroll-window {
    position: relative;
    overflow: hidden;
    background: #e8ecf3;
}
.preview-scroll-window img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 4s ease-in-out;
    will-change: transform;
}
@media (min-width: 768px) {
    .work-card.preview-web:hover .preview-scroll-window img,
    .preview-scroll-window.is-teasing img {
        transition: transform 4s ease-in-out;
    }
    .work-card.preview-web:hover .preview-scroll-window img {
        transform: translateY(calc(-100% + var(--preview-h, 220px)));
    }
}
.scroll-preview-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(10, 15, 25, 0.72);
    backdrop-filter: blur(8px);
    padding: 5px 10px;
    border-radius: 999px;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.preview-scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--brand-gradient);
    z-index: 4;
    transition: width 0.05s linear;
    border-radius: 0 2px 2px 0;
}

/* Web work cards */
.work-card.preview-web .work-card-media.preview-scroll-window {
    aspect-ratio: auto;
    height: var(--preview-h, 220px);
}
.work-card.preview-web .preview-scroll-window {
    height: 100%;
}

/* Sheet scrollable / zoom */
.sheet-media.sheet-scrollable {
    aspect-ratio: auto;
    max-height: 78vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sheet-media.sheet-scrollable img.zoomable {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}
.sheet-media.sheet-canva-embed {
    aspect-ratio: 3 / 4;
    max-height: 78vh;
}
.sheet-media.sheet-canva-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

/* Shared browser modal */
.liquid-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.liquid-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.parthaos-browser-window {
    width: 95vw;
    max-width: 1000px;
    height: 85vh;
    background: #f0f3f8;
    border-radius: 16px;
    box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.15), -10px -10px 30px rgba(255, 255, 255, 0.4), inset 3px 3px 10px rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    will-change: transform;
}
.liquid-modal-overlay.active .parthaos-browser-window {
    transform: translateY(0) scale(1);
}
.browser-header {
    background: #f0f3f8;
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.browser-dots { display: flex; gap: 8px; }
.browser-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.5);
}
.browser-dots .dot.red { background: #ff5f56; }
.browser-dots .dot.yellow { background: #ffbd2e; }
.browser-dots .dot.green { background: #27c93f; }
.browser-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8e929c;
    font-family: monospace;
    flex: 1;
    text-align: center;
    padding: 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.browser-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #8e929c;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.browser-progress-track {
    height: 4px;
    background: rgba(166, 180, 200, 0.35);
    flex-shrink: 0;
}
.browser-progress-bar {
    height: 100%;
    width: 0;
    background: var(--brand-gradient);
    transition: width 0.08s linear;
}
.browser-content {
    flex: 1;
    overflow-y: auto;
    background: #eaecf0;
    scroll-behavior: smooth;
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.02);
}
.browser-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* Character stage (desktop scroll-sync) */
#character-stage {
    display: none;
}
@media (min-width: 768px) {
    #character-stage {
        display: block;
        position: fixed;
        right: 4%;
        bottom: 100px;
        width: 280px;
        height: 380px;
        z-index: 5;
        pointer-events: none;
    }
    .prem-pose {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        opacity: 0;
        transition: opacity 0.6s ease, transform 0.4s ease;
        filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12));
    }
    .prem-pose.active-pose {
        opacity: 1;
    }
}

/* Home reel trigger button reset */
button.reel-item {
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
    font: inherit;
    text-align: inherit;
}
