@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

.serra-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.7);
    /* Modern slate dark */
    backdrop-filter: blur(8px);
    /* Premium glass effect */
    -webkit-backdrop-filter: blur(8px);
    display: none;
    z-index: 9999999 !important;
    font-family: 'Outfit', sans-serif;
}

.serra-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 480px;
    background-color: #ffffff;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    /* Center and Animate */
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    animation: serra_pop_in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes serra_pop_in {
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Subtle overlay on the background image for readability */
.serra-popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.85) 100%);
    z-index: 0;
    pointer-events: none;
}

.serra-popup-content * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.serra-popup-content>* {
    position: relative;
    z-index: 1;
}

.serra-popup-logo {
    display: inline-block;
    /* Fix for some themes forcing block */
    max-width: 120px;
    height: auto !important;
    /* Override theme fixed heights */
    width: auto !important;
    /* Override theme widths */
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}



.serra-popup-content h1 {
    color: #0f172a;
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.serra-popup-content p {
    color: #475569;
    font-size: 18px;
    margin-bottom: 24px;
    line-height: 1.6;
    font-weight: 400;
}

.serra-popup-btns {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.serra-popup-btn {
    flex: 1;
    min-width: 160px;
    padding: 16px 24px;
    text-decoration: none !important;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
}

.serra-popup-btn.primary {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(30, 41, 59, 0.3);
}

.serra-popup-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(30, 41, 59, 0.4);
    filter: brightness(1.2);
}

.serra-popup-btn.secondary {
    background: #ffffff;
    color: #1e293b !important;
    border: 2px solid #e2e8f0;
}

.serra-popup-btn.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.serra-popup-actions {
    margin-top: 20px;
}

.serra-popup-link {
    background: none;
    border: none;
    color: #94a3b8;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 12px;
}

.serra-popup-link:hover {
    color: #475569;
    background-color: #f1f5f9;
}

#serraPopupClose {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(241, 245, 249, 0.8);
    color: #64748b;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 28px;
    transition: all 0.2s ease;
    line-height: 1;
}

#serraPopupClose:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .serra-popup-content {
        width: 85%;
        padding: 35px 20px;
        border-radius: 20px;
    }

    .serra-popup-logo {
        max-width: 100px;
        /* Smaller logo on mobile */
        margin-bottom: 20px;
    }

    .serra-popup-content h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .serra-popup-content p {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .serra-popup-btns {
        flex-direction: column;
        /* Stack buttons vertically */
        gap: 10px;
    }

    .serra-popup-btn {
        width: 100%;
        min-width: unset;
        padding: 14px 20px;
        font-size: 15px;
    }

    #serraPopupClose {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .serra-popup-actions {
        margin-top: 15px;
    }

    .serra-popup-link {
        font-size: 13px;
    }
}

/* Extra small screens adjustment */
@media (max-width: 380px) {
    .serra-popup-content {
        width: 92%;
        padding: 30px 15px;
    }

    .serra-popup-content h1 {
        font-size: 22px;
    }

    .serra-popup-logo {
        max-width: 80px;
    }
}