/*
 * SV POPUP - Main Plugin Styles
 * v1.4.3 - Sleek redesign with blur
 */

/* ================================== */
/* 1. POPUP SHELL (Overlay, Window, Close)
/* ================================== */
#sv-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* --- NEW BLUR EFFECT --- */
    background-color: rgba(10, 20, 50, 0.3); /* More transparent for blur */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sv-popup-overlay.sv-popup-active {
    opacity: 1;
    visibility: visible;
}

.sv-popup-window {
    position: relative;
    z-index: 99999;
    transform: scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 90vh; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
}

#sv-popup-overlay.sv-popup-active .sv-popup-window {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.sv-popup-content {
    background-color: transparent; 
    padding: 0; 
    /* Remove shadow, let the content handle it */
    box-shadow: none;
    max-width: 1000px; 
    width: 95%; 
    position: relative;
}

/* --- NEW CLOSE BUTTON STYLE --- */
.sv-popup-close {
    position: absolute;
    top: 10px;  /* Position inside the top-right of the content */
    right: 20px;
    width: auto;
    height: auto;
    
    /* Removed background and border */
    background-color: transparent;
    color: #ffffff; /* Just a white 'X' */
    border-radius: 0;
    border: none;
    
    display: block;
    font-size: 2.8rem; /* Make it larger */
    line-height: 1;
    font-weight: 300; /* Thinner 'X' */
    font-family: Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    z-index: 100; 
    
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sv-popup-close:hover {
    transform: none; /* Remove previous hover */
    opacity: 1; /* Fade in */
}

/* Base styles for content slotted from WP */
.sv-popup-content-inner {
    /* This class is here for general WP content, but our specific HTML will override */
}

/* This targets the actual content from the WP editor */
.sv-popup-content-inner > * {
    max-width: 100%;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .sv-popup-content {
        width: 98%; 
        max-width: 98%; 
    }
    .sv-popup-close {
        top: 5px;
        right: 10px;
        font-size: 2.5rem;
    }
}

/* Body lock class to prevent scrolling */
body.sv-popup-body-lock {
    overflow: hidden;
}

/* ================================== */
/* 2. CUSTOM CONVERSATION AI STYLES
/* ================================== */

/* Define the brand colors */
:root {
    --primary-blue: #09a8ff;
    --gradient-blue-start: #09a8ff;
    --gradient-blue-end: #0088d2;
    --dark-background: #101535;
    --border-color: #4328b7;
    --text-light: #e0e0e0;
    --text-dark: #333;
    --text-highlight: #09a8ff;
    --container-bg: #1a2040; 
}

/* This is the main container for YOUR popup content */
.sv-convo-ai-container {
    max-width: 960px;
    margin: 0;
    padding: 30px;
    
    /* --- NEW TRANSLUCENT BACKGROUND --- */
    background-color: rgba(26, 32, 64, 0.85); /* 85% opacity of --container-bg */
    
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); /* Add shadow here */
}

.sv-convo-ai-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at top left, rgba(67, 40, 183, 0.3) 0%, transparent 40%),
                radial-gradient(circle at bottom right, rgba(9, 168, 255, 0.2) 0%, transparent 40%);
    z-index: 0;
    opacity: 0.3;
}

.sv-convo-ai-content-wrapper {
    position: relative;
    z-index: 1;
}

.sv-convo-ai-container h1,
.sv-convo-ai-container h2,
.sv-convo-ai-container h3,
.sv-convo-ai-container h4,
.sv-convo-ai-container h5,
.sv-convo-ai-container h6 {
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
}

.sv-convo-ai-container h1 {
    font-size: 2.8em;
    color: white;
    margin-top: 0;
    letter-spacing: -1px;
}

.sv-convo-ai-container p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--text-light);
}

.sv-convo-ai-key-benefits {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.sv-convo-ai-key-benefits li {
    background-color: var(--dark-background);
    border-left: 5px solid var(--primary-blue);
    padding: 15px 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.sv-convo-ai-key-benefits li::before {
    content: '✓';
    color: var(--primary-blue);
    font-size: 1.5em;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}
.sv-convo-ai-key-benefits li:hover::before {
    opacity: 1;
}

.sv-convo-ai-key-benefits li:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sv-convo-ai-key-benefits li strong {
    color: var(--primary-blue);
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
    margin-left: 30px; /* Offset for checkmark */
}
.sv-convo-ai-key-benefits li span {
    display: block;
    margin-left: 30px; /* Offset for checkmark */
}

/* --- NEW STYLE for the bottom text --- */
.sv-convo-ai-summary {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(0,0,0,0.2); /* Sleek dark transparent bg */
    border-radius: 10px;
    color: #e0e0e0; /* Lighter text */
    font-size: 1.15em;
    font-weight: 500;
}

/* --- NEW STYLE for the CTA button --- */
.sv-convo-ai-cta-button {
    display: block;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    margin: 30px auto 10px auto; /* Centered with spacing */
    padding: 14px 28px;
    background: linear-gradient(45deg, var(--gradient-blue-start), var(--gradient-blue-end));
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(9, 168, 255, 0.3);
    transition: all 0.3s ease;
}

.sv-convo-ai-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(9, 168, 255, 0.4);
    color: white;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .sv-convo-ai-container {
        padding: 20px;
    }
    .sv-convo-ai-container h1 {
        font-size: 2em;
    }
    .sv-convo-ai-key-benefits li {
        padding: 15px 20px;
    }
    .sv-convo-ai-key-benefits li strong,
    .sv-convo-ai-key-benefits li span {
        margin-left: 25px;
    }
    .sv-convo-ai-key-benefits li::before {
        left: 5px;
    }
}

@media (max-width: 480px) {
    .sv-convo-ai-container h1 {
        font-size: 1.6em;
    }
    .sv-convo-ai-container p {
        font-size: 1em;
    }
    .sv-convo-ai-key-benefits li {
        font-size: 0.95em;
    }
    .sv-convo-ai-key-benefits li strong,
    .sv-convo-ai-key-benefits li span {
        margin-left: 20px;
    }
    .sv-convo-ai-key-benefits li::before {
        left: 5px;
        font-size: 1.2em;
    }
    .sv-convo-ai-summary {
        font-size: 1.05em;
    }
}