/* Beehiiv Custom Popup Styles */
/* Netflix-themed popup for Beehiiv recommendations */

#beehiiv-custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.beehiiv-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: beehiivFadeIn 0.3s ease-out;
}

.beehiiv-popup-container {
    position: relative;
    z-index: 10001;
    max-width: 500px;
    width: 90%;
    animation: beehiivSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.beehiiv-popup-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.beehiiv-popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E50914 0%, #ff6b6b 100%);
}

.beehiiv-popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #E50914 0%, #b8070f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
    animation: beehiivPulse 2s ease-in-out infinite;
}

.beehiiv-popup-icon i {
    font-size: 2.5rem;
    color: #ffffff;
}

.beehiiv-popup-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.beehiiv-popup-message {
    font-size: 1rem;
    color: #b3b3b3;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.beehiiv-popup-button {
    background: linear-gradient(135deg, #E50914 0%, #b8070f 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.beehiiv-popup-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.beehiiv-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.6);
}

.beehiiv-popup-button:hover::before {
    left: 100%;
}

.beehiiv-popup-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
}

.beehiiv-popup-button i {
    transition: transform 0.3s ease;
}

.beehiiv-popup-button:hover i {
    transform: translateX(4px);
}

/* Animations */
@keyframes beehiivFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes beehiivSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes beehiivPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(229, 9, 20, 0.6);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .beehiiv-popup-container {
        width: 95%;
        max-width: none;
    }

    .beehiiv-popup-content {
        padding: 2rem 1.5rem;
    }

    .beehiiv-popup-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
    }

    .beehiiv-popup-icon i {
        font-size: 2rem;
    }

    .beehiiv-popup-title {
        font-size: 1.4rem;
    }

    .beehiiv-popup-message {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .beehiiv-popup-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .beehiiv-popup-content {
        background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    }
}

/* Accessibility */
.beehiiv-popup-button:focus {
    outline: 3px solid rgba(229, 9, 20, 0.5);
    outline-offset: 2px;
}

/* Loading state */
.beehiiv-popup-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.beehiiv-popup-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: beehiivSpin 0.6s linear infinite;
    right: 1rem;
}

@keyframes beehiivSpin {
    to {
        transform: rotate(360deg);
    }
}



