/**
 * SquarePixel Popup Offers Styles
 */

.sqpx-offer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.sqpx-offer-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: sqpx-offer-slide-in 0.3s ease-out;
}

@keyframes sqpx-offer-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sqpx-offer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.sqpx-offer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sqpx-offer-title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
    padding-right: 40px;
}

.sqpx-offer-content {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.sqpx-offer-content p {
    margin: 0 0 12px 0;
}

.sqpx-offer-content p:last-child {
    margin-bottom: 0;
}

.sqpx-offer-content a {
    color: #64b5f6;
    text-decoration: underline;
}

.sqpx-offer-content a:hover {
    color: #90caf9;
}

.sqpx-offer-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.sqpx-offer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.sqpx-offer-btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(238, 90, 90, 0.4);
}

.sqpx-offer-btn-primary:hover {
    background: linear-gradient(135deg, #ff7b7b 0%, #ff6a6a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 90, 0.5);
}

.sqpx-offer-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sqpx-offer-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .sqpx-offer-modal {
        padding: 24px;
        margin: 10px;
    }
    
    .sqpx-offer-title {
        font-size: 20px;
    }
    
    .sqpx-offer-content {
        font-size: 15px;
    }
    
    .sqpx-offer-actions {
        flex-direction: column;
    }
    
    .sqpx-offer-btn {
        width: 100%;
    }
}

/* ============================================
   STARBURST STYLE POPUP
   ============================================ */

.sqpx-offer-starburst-wrapper {
    position: relative;
    min-width: 280px;
    min-height: 280px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sqpx-starburst-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sqpx-starburst-pop {
    0% {
        transform: scale(0) rotate(-15deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.sqpx-offer-starburst {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    clip-path: polygon(
        50% 0%,
        61% 12%,
        75% 3%,
        77% 20%,
        97% 20%,
        88% 35%,
        100% 50%,
        88% 65%,
        97% 80%,
        77% 80%,
        75% 97%,
        61% 88%,
        50% 100%,
        39% 88%,
        25% 97%,
        23% 80%,
        3% 80%,
        12% 65%,
        0% 50%,
        12% 35%,
        3% 20%,
        23% 20%,
        25% 3%,
        39% 12%
    );
    box-shadow: 0 10px 40px rgba(185, 28, 28, 0.5);
}

.sqpx-offer-starburst::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    clip-path: inherit;
}

.sqpx-offer-starburst-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 50px;
    max-width: 400px;
    cursor: pointer;
}

.sqpx-offer-starburst-close {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    color: #fff;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sqpx-offer-starburst-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.sqpx-offer-starburst-title {
    color: #fff;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.sqpx-offer-starburst-text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sqpx-offer-starburst-button {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #b91c1c;
    font-size: 14px;
    font-weight: 700;
    border-radius: 20px;
    text-decoration: none;
    text-shadow: none;
    transition: transform 0.2s, background 0.2s;
}

.sqpx-offer-starburst-button:hover {
    background: #fff;
    transform: scale(1.05);
}

/* Mobile responsive for starburst */
@media (max-width: 480px) {
    .sqpx-offer-starburst-wrapper {
        min-width: 240px;
        min-height: 240px;
    }
    
    .sqpx-offer-starburst-content {
        padding: 40px;
    }
    
    .sqpx-offer-starburst-title {
        font-size: 32px;
    }
    
    .sqpx-offer-starburst-text {
        font-size: 14px;
    }
}

/* ============================================
   VIDEO STARBURST STYLE POPUP
   ============================================ */

.sqpx-video-starburst-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sqpx-starburst-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sqpx-video-starburst-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: polygon(
        50% 0%,
        61% 12%,
        75% 3%,
        77% 20%,
        97% 20%,
        88% 35%,
        100% 50%,
        88% 65%,
        97% 80%,
        77% 80%,
        75% 97%,
        61% 88%,
        50% 100%,
        39% 88%,
        25% 97%,
        23% 80%,
        3% 80%,
        12% 65%,
        0% 50%,
        12% 35%,
        3% 20%,
        23% 20%,
        25% 3%,
        39% 12%
    );
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.8);
}

.sqpx-video-starburst-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sqpx-video-starburst-border {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    clip-path: polygon(
        50% 0%,
        61% 12%,
        75% 3%,
        77% 20%,
        97% 20%,
        88% 35%,
        100% 50%,
        88% 65%,
        97% 80%,
        77% 80%,
        75% 97%,
        61% 88%,
        50% 100%,
        39% 88%,
        25% 97%,
        23% 80%,
        3% 80%,
        12% 65%,
        0% 50%,
        12% 35%,
        3% 20%,
        23% 20%,
        25% 3%,
        39% 12%
    );
    pointer-events: none;
}

.sqpx-video-starburst-border::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: transparent;
    clip-path: inherit;
}

.sqpx-video-starburst-content {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 60%;
    height: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    pointer-events: none;
}

.sqpx-video-starburst-title {
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 8px;
}

.sqpx-video-starburst-text {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 4px;
}

.sqpx-video-starburst-close {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    color: #fff;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sqpx-video-starburst-close:hover {
    background: #000;
    transform: scale(1.1);
}

.sqpx-video-starburst-clickable {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
    clip-path: polygon(
        50% 0%,
        61% 12%,
        75% 3%,
        77% 20%,
        97% 20%,
        88% 35%,
        100% 50%,
        88% 65%,
        97% 80%,
        77% 80%,
        75% 97%,
        61% 88%,
        50% 100%,
        39% 88%,
        25% 97%,
        23% 80%,
        3% 80%,
        12% 65%,
        0% 50%,
        12% 35%,
        3% 20%,
        23% 20%,
        25% 3%,
        39% 12%
    );
}

/* Mobile responsive for video starburst */
@media (max-width: 480px) {
    .sqpx-video-starburst-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .sqpx-video-starburst-title {
        font-size: 22px;
    }
    
    .sqpx-video-starburst-text {
        font-size: 12px;
    }
}
