/* Template preview (resources/views/partials/template-preview.blade.php). */
.tp { outline: none; display: flex; flex-direction: column; gap: .75rem; }
.tp:focus-visible .tp-stage { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent, #405189) 40%, transparent); }
.tp-stage {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 420px; height: min(78vh, 760px); padding: 1.25rem;
    background: radial-gradient(circle at 50% 40%, #3a4152 0%, #1c212b 75%); border-radius: 14px; overflow: hidden;
}
.tp-book { width: 100%; height: 100%; }
.tp-poster { max-height: 100%; max-width: 60%; border-radius: 4px 10px 10px 4px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); opacity: .9; }
.tp.is-ready .tp-poster { display: none; }
.tp:not(.is-ready) .tp-book { position: absolute; width: 0; height: 0; overflow: hidden; }
.tp-status {
    position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
    padding: .35rem .9rem; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .85rem; white-space: nowrap;
}
.tp.is-failed .tp-status { background: #b42318; }
.tp-bar { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.tp-count { min-width: 7rem; text-align: center; color: var(--ui-muted, #6b7280); font-variant-numeric: tabular-nums; }
.tp-card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.tp-card-link .card { transition: transform .15s ease, box-shadow .15s ease; }
.tp-card-link:hover .card, .tp-card-link:focus-visible .card { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(15, 23, 42, .35); }
.tp-card-cover { position: relative; }
.tp-card-cover .tp-card-hint {
    position: absolute; inset: auto 0 0 0; padding: .5rem; text-align: center; font-size: .8rem; font-weight: 600;
    color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); opacity: 0; transition: opacity .15s ease;
}
.tp-card-link:hover .tp-card-hint, .tp-card-link:focus-visible .tp-card-hint { opacity: 1; }
@media (hover: none) { .tp-card-cover .tp-card-hint { opacity: 1; } }
@media (max-width: 575.98px) { .tp-stage { min-height: 320px; height: 62vh; padding: .5rem; } }
#tp-modal .tp-stage { height: min(70vh, 680px); }
.tp-page { background: #fff; overflow: hidden; }
.tp-page img { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; pointer-events: none; }
