/* Şablon kartlarında kayan önizleme — bkz. renderTemplatePreviewMedia() (includes/functions.php)
   ve assets/js/sablon-onizleme.js. Kart kapsayıcısı (aspect-[3/4] + overflow-hidden) konumlandırılmış olmalı. */

.tpl-preview {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #f3ede4;
}

/* Uzun sayfa: görsel kart genişliğinde, yukarıdan aşağı kayar */
.tpl-preview__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-width: none;
    transform: translateY(0);
    will-change: transform;
}

/* Tek ekranlı şablon: telefon ekranı ortada, kareler arasında yumuşak geçiş */
.tpl-preview--frames {
    background: radial-gradient(120% 90% at 50% 0%, #f7f1ea 0%, #e9dfee 100%);
}
.tpl-preview__frame {
    position: absolute;
    top: 6%;
    left: 50%;
    height: 88%;
    width: auto;
    max-width: none;
    transform: translateX(-50%);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(60, 30, 80, 0.22);
    opacity: 0;
    transition: opacity 0.6s ease;
}
.tpl-preview__frame.is-active {
    opacity: 1;
}

/* Küçük ipucu rozeti — oynatılırken kaybolur */
.tpl-preview::after {
    content: "Önizle";
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 10px 4px 26px;
    border-radius: 999px;
    font: 600 11px/1.4 Inter, system-ui, sans-serif;
    letter-spacing: 0.02em;
    color: #fff;
    background: rgba(40, 20, 55, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 4l-5 5h3.5v6H7l5 5 5-5h-3.5V9H17z'/%3E%3C/svg%3E") no-repeat 8px center / 13px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.tpl-preview--frames::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}
.tpl-preview.is-playing::after {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .tpl-preview::after { display: none; }
}
