/* Cinematic confirm — replaces the browser confirm() box. */

.swal2-container {
    z-index: 2000 !important;
}

.swal2-container.tp-cine-stage {
    background:
        radial-gradient(900px 520px at 50% 42%, rgba(36, 78, 112, 0.42), rgba(3, 10, 18, 0.78) 70%) !important;
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.tp-cine-popup.swal2-popup {
    width: min(420px, calc(100vw - 2rem)) !important;
    padding: 0 !important;
    border-radius: 28px !important;
    border: 1px solid transparent !important;
    background:
        linear-gradient(165deg, rgba(22, 58, 84, 0.96), rgba(7, 22, 36, 0.98) 58%, #061018) padding-box,
        linear-gradient(145deg, rgba(255, 226, 160, 0.95), rgba(232, 168, 56, 0.18) 38%, rgba(255, 255, 255, 0.16) 52%, rgba(232, 168, 56, 0.85)) border-box !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.28) inset,
        0 -18px 40px rgba(0, 0, 0, 0.28) inset,
        0 18px 30px rgba(0, 0, 0, 0.28),
        0 50px 90px rgba(0, 0, 0, 0.48) !important;
    overflow: hidden !important;
    color: #fff;
    font-family: "Manrope", system-ui, sans-serif;
}

.tp-cine-popup .swal2-title,
.tp-cine-popup .swal2-icon {
    display: none !important;
}

.tp-cine-popup .swal2-html-container {
    margin: 0 !important;
    padding: 1.7rem 1.55rem 0.15rem !important;
    overflow: visible !important;
    color: rgba(255, 255, 255, 0.78);
}

.tp-cine {
    position: relative;
    text-align: center;
}

.tp-cine-orb {
    position: absolute;
    left: 50%;
    top: -8px;
    width: 160px;
    height: 110px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(232, 168, 56, 0.38), transparent 68%);
    filter: blur(2px);
    pointer-events: none;
}

.tp-cine-popup-danger .tp-cine-orb {
    background: radial-gradient(circle, rgba(255, 92, 82, 0.42), transparent 68%);
}

.tp-cine-popup-neutral .tp-cine-orb {
    background: radial-gradient(circle, rgba(90, 168, 214, 0.4), transparent 68%);
}

.tp-cine-medal {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 0.85rem;
    perspective: 520px;
    animation: tpCineMedal 4.6s ease-in-out infinite;
}

.tp-cine-medal-ring {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 6px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(232, 168, 56, 0.55);
    background: radial-gradient(ellipse at center, rgba(232, 168, 56, 0.28), transparent 70%);
    transform: rotateX(68deg);
    box-shadow: 0 0 18px rgba(232, 168, 56, 0.28);
}

.tp-cine-medal-face {
    position: relative;
    z-index: 1;
    width: 74px;
    height: 74px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 24px;
    color: #fff;
    font-size: 1.75rem;
    background: linear-gradient(160deg, #8ec8ea 0%, #1a6b9a 48%, #0b3d5c 100%);
    box-shadow:
        0 16px 28px rgba(8, 40, 64, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -10px 16px rgba(0, 0, 0, 0.28);
    transform: translateZ(28px);
}

.tp-cine-medal-face::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.55), transparent 42%);
    pointer-events: none;
}

.tp-cine-popup-danger .tp-cine-medal-face {
    background: linear-gradient(160deg, #ffb0a8 0%, #e23b32 46%, #8d140f 100%);
    box-shadow:
        0 16px 28px rgba(160, 28, 22, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -10px 16px rgba(0, 0, 0, 0.28);
}

.tp-cine-popup-warn .tp-cine-medal-face {
    color: #2a1c04;
    background: linear-gradient(160deg, #ffe7ad 0%, #f0b429 48%, #b7791f 100%);
    box-shadow:
        0 16px 28px rgba(180, 120, 20, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -10px 16px rgba(120, 70, 0, 0.25);
}

.tp-cine-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #e8a838;
}

.tp-cine-title {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 650;
    line-height: 1.2;
    color: #fff;
}

.tp-cine-text {
    margin: 0.55rem auto 0;
    max-width: 32ch;
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.tp-cine-popup .swal2-actions {
    width: 100%;
    margin: 0 !important;
    padding: 1.15rem 1.4rem 1.4rem;
    gap: 0.7rem;
}

.tp-cine-ok,
.tp-cine-no {
    flex: 1 1 0;
    min-height: 46px;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.tp-cine-no {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tp-cine-ok {
    color: #241804;
    border: 0;
    background: linear-gradient(180deg, #ffe7b0 0%, #e8a317 100%);
    box-shadow:
        0 10px 22px rgba(232, 163, 23, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.tp-cine-popup-danger .tp-cine-ok {
    color: #fff;
    background: linear-gradient(180deg, #ff8d84 0%, #d3261c 58%, #9a140e 100%);
    box-shadow:
        0 12px 24px rgba(180, 32, 24, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.tp-cine-ok:hover,
.tp-cine-no:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.tp-cine-ok:focus-visible,
.tp-cine-no:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.tp-cine-popup::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.16) 46%, transparent 62%);
    transform: translateX(-130%);
    animation: tpCineSheen 1.15s ease 0.25s 1 both;
    pointer-events: none;
}

@keyframes tpCineIn {
    0% {
        opacity: 0;
        transform: perspective(900px) rotateX(18deg) translateY(36px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: perspective(900px) rotateX(0deg) translateY(0) scale(1);
    }
}

@keyframes tpCineOut {
    to {
        opacity: 0;
        transform: perspective(900px) rotateX(-10deg) translateY(18px) scale(0.96);
    }
}

@keyframes tpCineMedal {
    0%, 100% { transform: translateY(0) rotateY(-8deg); }
    50% { transform: translateY(-7px) rotateY(10deg); }
}

@keyframes tpCineSheen {
    to { transform: translateX(130%); }
}

.tp-cine-in {
    animation: tpCineIn 0.62s cubic-bezier(0.16, 1.15, 0.32, 1) both;
}

.tp-cine-out {
    animation: tpCineOut 0.26s ease forwards;
}

@media (max-width: 480px) {
    .tp-cine-title { font-size: 1.28rem; }
    .tp-cine-popup .swal2-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    .tp-cine-in,
    .tp-cine-out,
    .tp-cine-medal,
    .tp-cine-popup::before {
        animation: none !important;
    }
}
