/* ===========================
   TS Popup — Style + Animacje
   =========================== */

/* --- Overlay --- */
.ts-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.ts-popup-overlay.ts-popup-visible {
    background: rgba(0, 0, 0, 0.55);
}

/* --- Modal --- */
.ts-popup-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    padding: 40px 36px 32px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.ts-popup-visible .ts-popup-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* --- Close Button --- */
.ts-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.2s;
    z-index: 2;
}

.ts-popup-close:hover {
    color: #333;
}

/* --- Bunny SVG --- */
.ts-popup-bunny {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.ts-bunny-svg {
    width: 100px;
    height: 130px;
    animation: bunny-hop 2s ease-in-out infinite;
}

/* Prawe ucho — machanie */
.ts-ear-right {
    transform-origin: 130px 110px;
    animation: ear-wiggle 1.6s ease-in-out infinite;
}

.ts-ear-inner-right {
    transform-origin: 130px 95px;
    animation: ear-wiggle 1.6s ease-in-out infinite;
}

/* --- Animacje --- */
@keyframes bunny-hop {
    0%, 100% { transform: translateY(0); }
    15% { transform: translateY(-12px); }
    30% { transform: translateY(0); }
    45% { transform: translateY(-6px); }
    60% { transform: translateY(0); }
}

@keyframes ear-wiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(12deg); }
    40% { transform: rotate(-6deg); }
    60% { transform: rotate(8deg); }
    80% { transform: rotate(0deg); }
}

/* --- Title --- */
.ts-popup-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px;
    line-height: 1.3;
}

/* --- Description --- */
.ts-popup-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 24px;
    padding: 0 8px;
}

/* --- Buttons --- */
.ts-popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.ts-popup-btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-family: inherit;
}

.ts-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ts-popup-btn:active {
    transform: translateY(0);
}

.ts-popup-btn-primary {
    background: #222;
    color: #fff;
}

.ts-popup-btn-primary:hover {
    background: #444;
    color: #fff;
}

.ts-popup-btn-secondary {
    background: #FFD700;
    color: #222;
}

.ts-popup-btn-secondary:hover {
    background: #f0c800;
    color: #222;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 600px) {
    .ts-popup-modal {
        padding: 30px 20px 24px;
        border-radius: 16px;
    }

    .ts-bunny-svg {
        width: 80px;
        height: 104px;
    }

    .ts-popup-title {
        font-size: 1.3rem;
    }

    .ts-popup-desc {
        font-size: 0.88rem;
        padding: 0;
    }

    .ts-popup-buttons {
        flex-direction: column;
    }

    .ts-popup-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}
