/* UndanganPiyo - gaya bersama untuk semua tema undangan */
body.inv-locked { overflow: hidden; height: 100vh; }

[data-inv-cover] {
    position: fixed; inset: 0; z-index: 9990;
    transition: transform .9s cubic-bezier(.7, 0, .3, 1), opacity .9s ease;
}
[data-inv-cover].is-leaving { transform: translateY(-100%); opacity: 0; }

/* Tombol musik */
.inv-music {
    position: fixed; right: 16px; bottom: 16px; z-index: 9980;
    width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    background: var(--inv-music-bg, #222); color: var(--inv-music-color, #fff);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
body.inv-opened .inv-music { display: flex; }
.inv-music svg { width: 20px; height: 20px; }
.inv-music .inv-icon-pause { display: none; }
.inv-music.is-playing { animation: inv-spin 4s linear infinite; }
.inv-music.is-playing .inv-icon-pause { display: block; }
.inv-music.is-playing .inv-icon-play { display: none; }
@keyframes inv-spin { to { transform: rotate(360deg); } }

/* Toast */
.inv-toast {
    position: fixed; left: 50%; bottom: 80px; z-index: 10000;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px;
    background: rgba(20, 20, 20, .92); color: #fff; font: 500 14px/1.4 system-ui, sans-serif;
    text-align: center; transition: all .3s ease;
}
.inv-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* Lightbox */
.inv-lightbox {
    position: fixed; inset: 0; z-index: 10001; display: none;
    align-items: center; justify-content: center; background: rgba(0, 0, 0, .92);
}
.inv-lightbox.is-open { display: flex; }
.inv-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.inv-lightbox button {
    position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; cursor: pointer;
    width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1;
}
.inv-lb-close { top: 16px; right: 16px; }
.inv-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.inv-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Animasi muncul */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
[data-reveal="zoom"] { transform: scale(.92); }
[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Bar preview & pemilik */
.inv-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9995;
    display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
    padding: 8px 14px; background: #111; color: #fff; font: 500 13px/1.3 system-ui, sans-serif; text-align: center;
}
.inv-topbar a { color: #111; background: #ffd166; padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.inv-topbar.is-warning { background: #b91c1c; }
.inv-topbar.is-warning a { background: #fff; }
