/* Styling for the Rich Preview Card */
.gemini-preview-card {
    position: absolute;
    z-index: 99999;
    width: 350px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden; /* Important for the rounded corners on the image */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

/* Image styling */
.gemini-preview-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #eee;
}

/* Content Area */
.gemini-preview-content {
    padding: 16px;
}

.gemini-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 8px 0;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gemini-preview-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading State */
.gemini-preview-card.gemini-is-loading {
    height: 100px;
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gemini-preview-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*
=================================================
NEW STYLES: AI Summary Content Formatting
=================================================
*/

/* Target all subheadings inside the AI summary box */
.gemini-search-summary h3 {
    font-size: 19px; /* Much smaller than the theme's default h3 */
    font-weight: 600; /* Bold, but not overly heavy */
    color: #333; /* A standard dark text color */
    margin-top: 24px; /* Space above each new section */
    margin-bottom: 12px; /* Space between the heading and its paragraph */
    line-height: 1.4;
}

/* Remove the top margin from the very first subheading */
.gemini-search-summary h3:first-of-type {
    margin-top: 0;
}

/* Style the bulleted list of related links */
.gemini-search-summary ul {
    list-style-type: disc; /* Use standard disc bullets */
    margin-left: 20px; /* Indent the list */
    margin-bottom: 1.5em; /* Space below the list */
}

.gemini-search-summary ul li {
    padding-left: 5px;
    margin-bottom: 10px; /* Space between each link */
}

/* Style for the "Related Links" subheading */
.gemini-links-heading {
    font-size: 16px; /* Smaller than the main topic heading */
    color: #555;
    margin-top: 1.5em; /* Give it some space from the summary text */
    margin-bottom: 0.8em;
}

/*
=================================================
FIX: CTA STYLING
=================================================
*/

/*
 * 1. NEW rule for the CTA on Single Posts / Category pages.
 * This ensures it has a clean, simple look without any background.
*/
.ssp-cta-container {
    /*border-top: 1px solid #eee;*/
    border-bottom: 1px solid #eee;
    padding: 25px 15px;
    margin: 30px 0;
    text-align: center;
    background: transparent; /* A very light grey background */
}

.ssp-article-cta {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    padding: 0;
}

/*
 * 2. SCOPED rule for the CTA inside the AI Search Summary ONLY.
 * This prevents its styles from leaking out.
*/
.gemini-search-summary p.gemini-cta {
    background-color: #eaf2fa; /* Your original blue background */
    border: 1px solid #c9dcec;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}