/* ProOverlay Styles */
.ep-pro-section-wrapper {
    position: relative;
    width: 100%;

    .ep-pro-content-container {
        position: relative;

        // Gray out content when pro overlay is shown
        filter: grayscale(100%);
        opacity: 0.7;

        // Locked state: the Pro children are not rendered at all (see
        // ProOverlay.js), so a stand-in carries the section's height and the
        // absolutely-positioned overlay still has a box to fill. Without it
        // the container collapses and the upsell has nothing to sit on.
        &.ep-pro-content-locked {
            min-height: 220px;

            .ep-pro-locked-placeholder {
                min-height: 220px;
                width: 100%;
                border-radius: 8px;
                background: repeating-linear-gradient(
                    135deg,
                    #f3f4f6,
                    #f3f4f6 12px,
                    #eceef1 12px,
                    #eceef1 24px
                );
            }
        }

        // Gray out text content
        * {
            color: #9ca3af !important;
        }

        // Gray out backgrounds
        .ep-card-wrapper,
        .ep-overview-card,
        .ep-analytics-card {
            background-color: #f9fafb !important;
        }

        // Gray out charts and graphs
        // canvas,
        // svg {
        //     filter: grayscale(100%) opacity(0.5);
        // }

        // Gray out tables
        table {
            th,
            td {
                color: #9ca3af !important;
                border-color: #e5e7eb !important;
            }

            tbody tr:nth-child(even) {
                background-color: #f9fafb !important;
            }
        }

        // Gray out chart legends
        .chart-legend-custom {
            * {
                color: #9ca3af !important;
            }
        }

        .ep-pro-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            border-radius: 16px;
            opacity: 0;
            transition: all 0.3s ease;

            .ep-pro-overlay-content {
                .ep-pro-eye-icon {
                    background: rgba(108, 92, 231, 0.1);
                    border: none;
                    border-radius: 50%;
                    width: 48px;
                    height: 48px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    cursor: pointer;
                    color: white;
                    transition: all 0.3s ease;
                    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
                    transform: scale(0.8);
                    opacity: 0;

                    &:hover {
                        transform: scale(1.1);
                        box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
                        background: #6c5ce7;
                    }

                    &:active {
                        transform: scale(0.95);
                    }

                    svg {
                        width: 24px;
                        height: 24px;
                    }
                }
            }
        }

        // Show overlay and eye icon on hover
        &:hover {
            .ep-pro-overlay {
                opacity: 1;
                background: rgba(255, 255, 255, 0.1);
                backdrop-filter: blur(4px);

                .ep-pro-overlay-content .ep-pro-eye-icon {
                    transform: scale(1);
                    opacity: 1;
                    background: white;
                }
            }
        }
    }
}

.ep-card-wrapper.views-chart .ep-pro-overlay {
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Overlay */
.ep-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
}

/* Analytics Pro Modal */
.ep-analytics-pro-modal {
    background: white;
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;

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

    @media screen and (max-width: 768px) {
        margin: 10px;
        border-radius: 16px;
        max-height: 95vh;
    }

    .ep-modal-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: #f8f9fa;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #6b7280;
        transition: all 0.2s ease;
        z-index: 10;
        display: flex;
        margin: 0;

        &:hover {
            background: #ef4444;
            border-color: #ef4444;
            color: white;
            transform: scale(1.05);
        }

        &:active {
            transform: scale(0.95);
        }

        svg {
            width: 20px;
            height: 20px;
        }
    }

    .ep-modal-header {
        text-align: center;
        padding: 40px 40px 20px;
        border: none;
        flex-direction: column;

        @media screen and (max-width: 768px) {
            padding: 30px 20px 15px;
        }

        .ep-embedpress-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 20px;

            svg {
                height: 36px;

                @media screen and (max-width: 768px) {
                    height: 28px;
                }
            }

            @media screen and (max-width: 768px) {
                margin-bottom: 20px;
                gap: 8px;
            }

            .ep-logo-text {
                font-size: 20px;
                font-weight: 600;
                color: #374151;

                @media screen and (max-width: 768px) {
                    font-size: 18px;
                }
            }
        }

        .ep-modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #25396f;
            margin: 0 0 5px;
            line-height: 1.2;

            @media screen and (max-width: 768px) {
                margin-bottom: 8px;
            }
        }

        .ep-modal-subtitle {
            font-size: 1rem;
            color: #7f8bb2;
            margin: 0;
            line-height: 1.5;

            @media screen and (max-width: 768px) {
                font-size: 14px;
            }
        }
    }

    .ep-modal-body {
        padding: 0 24px;

        .ep-pro-features-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 5px 24px;
            background: #f5f7fd;
            margin: 40px 0;
            margin-top: 0;
            padding: 35px 20px 20px;
            border-radius: 10px;

            @media screen and (max-width: 768px) {
                grid-template-columns: 1fr;
                gap: 20px;
                margin-bottom: 30px;
            }

            .ep-pro-feature-item {
                display: flex;
                gap: 15px;
                align-items: flex-start;

                @media screen and (max-width: 768px) {
                    gap: 12px;
                }

                .ep-feature-icon {
                    width: 48px;
                    height: 48px;
                    border-radius: 12px;
                    background: #ece8ff;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    flex-shrink: 0;

                    @media screen and (max-width: 768px) {
                        width: 40px;
                        height: 40px;
                        border-radius: 10px;
                    }

                    svg {
                        width: 24px;
                        height: 24px;

                        @media screen and (max-width: 768px) {
                            width: 20px;
                            height: 20px;
                        }
                    }
                }

                .ep-feature-content {
                    flex: 1;

                    h4 {
                        font-size: 1rem;
                        font-weight: 600;
                        color: #092161;
                        margin: 0 0 5px;
                        line-height: 1.3;

                        @media screen and (max-width: 768px) {
                            margin-bottom: 6px;
                        }
                    }

                    p {
                        font-size: 0.875rem;
                        color: #7c8db5;
                        margin: 0;
                        line-height: 1.5;
                    }
                }
            }
        }

        .ep-pro-actions {
            text-align: center;
            margin-bottom: 40px;

            .ep-unlock-pro-btn {
                background: linear-gradient(135deg, #6c5ce7 0%, #a855f7 100%);
                color: white;
                border: none;
                border-radius: 12px;
                padding: 16px 32px;
                font-size: 16px;
                font-weight: 600;
                cursor: pointer;
                transition: all 0.3s ease;
                box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);

                @media screen and (max-width: 768px) {
                    padding: 14px 28px;
                    font-size: 15px;
                    width: 100%;
                }

                &:hover {
                    transform: translateY(-2px);
                    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
                }

                &:active {
                    transform: translateY(0);
                    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
                }
            }
        }
    }
}
