/**
 * AI Summarize & Share Buttons Stylesheet
 */

/* General Section Wrapper - Clean in-content display */
.ai-share-section-top {
    text-align: left;
    clear: both;
    margin: 20px 0 25px 0;
    font-family: inherit;
    box-sizing: border-box;
    display: block;
    background: transparent !important;
}

.ai-share-section-top * {
    box-sizing: border-box;
}

/* Alignments */
.ai-align-left .ai-share-buttons-wrap { justify-content: flex-start; }
.ai-align-center .ai-share-buttons-wrap { justify-content: center; }
.ai-align-right .ai-share-buttons-wrap { justify-content: flex-end; }
.ai-align-center .ai-share-title { text-align: center; }
.ai-align-right .ai-share-title { text-align: right; }

.ai-share-section-top .ai-share-title,
.ai-share-title {
    margin: 0 0 12px 0;
    font-size: 14px !important;
    color: #1E293B !important;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: block;
}

.ai-share-buttons-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Button Base (Pill Design) */
.ai-btn-top {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    color: #333333 !important;
    background: #EEEEEE !important;
    border: 1px solid #DDDDDD;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

/* Shapes */
.ai-shape-pill .ai-btn-top {
    border-radius: 30px;
}

.ai-shape-rounded .ai-btn-top {
    border-radius: 6px;
}

.ai-shape-square .ai-btn-top {
    border-radius: 0px;
}

/* Hover Effects */
.ai-btn-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ai-btn-top:active {
    transform: translateY(0);
}

/* Icon Container */
.ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ai-icon img,
.ai-icon svg {
    width: 18px;
    height: 18px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    vertical-align: middle;
    transition: filter 0.2s ease;
}

/* Light Theme Variant */
.ai-theme-light .ai-btn-top {
    background: #EEEEEE !important;
    color: #333333 !important;
    border-color: #DDDDDD !important;
}

.ai-theme-light .ai-btn-top:hover {
    background: #E2E8F0 !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
}

.ai-theme-light .ai-btn-top:hover img,
.ai-theme-light .ai-btn-top:hover svg {
    filter: none !important;
}

/* Dark Theme Variant */
.ai-theme-dark .ai-btn-top {
    background: #0F172A !important;
    color: #FFFFFF !important;
    border-color: #0F172A !important;
}

.ai-theme-dark .ai-btn-top:hover {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #2563EB !important;
}

/* Invert monochrome icons on dark buttons */
.ai-theme-dark .ai-btn-top.grok img,
.ai-theme-dark .ai-btn-top.grok svg,
.ai-theme-dark .ai-btn-top.chatgpt img,
.ai-theme-dark .ai-btn-top.chatgpt svg,
.ai-theme-dark .ai-btn-top.perplexity img,
.ai-theme-dark .ai-btn-top.perplexity svg {
    filter: brightness(0) invert(1);
}

/* Brand Colors Mode - Crisp & Colorful on Normal AND on Hover */
.ai-theme-brand .ai-btn-top:hover img,
.ai-theme-brand .ai-btn-top:hover svg {
    filter: none !important;
}

.ai-theme-brand .ai-btn-top.googleai { background: #EBF3FE !important; border-color: #C3D9FF !important; color: #174EA6 !important; }
.ai-theme-brand .ai-btn-top.googleai:hover { background: #D2E3FC !important; border-color: #AECBFA !important; }

.ai-theme-brand .ai-btn-top.claude { background: #FAF0E6 !important; border-color: #EBD1B7 !important; color: #7B341E !important; }
.ai-theme-brand .ai-btn-top.claude:hover { background: #F5DEC9 !important; border-color: #DEBCA0 !important; }

.ai-theme-brand .ai-btn-top.chatgpt { background: #E6F8F2 !important; border-color: #B4EADB !important; color: #0C6B53 !important; }
.ai-theme-brand .ai-btn-top.chatgpt:hover { background: #D1F2E6 !important; border-color: #92DFCA !important; }

.ai-theme-brand .ai-btn-top.grok { background: #F3F4F6 !important; border-color: #D1D5DB !important; color: #111827 !important; }
.ai-theme-brand .ai-btn-top.grok:hover { background: #E5E7EB !important; border-color: #9CA3AF !important; }

.ai-theme-brand .ai-btn-top.perplexity { background: #EBF7F7 !important; border-color: #BDE4E4 !important; color: #116B6B !important; }
.ai-theme-brand .ai-btn-top.perplexity:hover { background: #D8F0F0 !important; border-color: #95D4D4 !important; }

.ai-theme-brand .ai-btn-top.copilot { background: #EBF4FC !important; border-color: #B9DCFA !important; color: #005A9E !important; }
.ai-theme-brand .ai-btn-top.copilot:hover { background: #D6EAFA !important; border-color: #98CBF7 !important; }

.ai-theme-brand .ai-btn-top.deepseek { background: #EDF3FF !important; border-color: #C4D7FF !important; color: #0040C1 !important; }
.ai-theme-brand .ai-btn-top.deepseek:hover { background: #D6E4FF !important; border-color: #9EBDFF !important; }

.ai-theme-brand .ai-btn-top.meta { background: #EEF4FD !important; border-color: #C7DCFA !important; color: #0050B3 !important; }
.ai-theme-brand .ai-btn-top.meta:hover { background: #D6E4FB !important; border-color: #9FC1F7 !important; }

/* Optional Floating Sticky Buttons (Zero Background, Zero Border Container) */
.ai-sticky-bar {
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 0);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    max-width: calc(100vw - 32px);
    width: auto;
    pointer-events: auto;
}

.ai-sticky-bar.ai-scroll-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 40px);
}

.ai-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent !important;
    padding: 0;
    margin: 0 auto;
}

.ai-sticky-inner .ai-share-section-top {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.ai-sticky-inner .ai-share-buttons-wrap {
    gap: 8px;
}

/* Floating shadow on individual buttons */
.ai-sticky-inner .ai-btn-top {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ai-sticky-inner .ai-btn-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.20);
}

.ai-sticky-close-btn {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    font-size: 16px;
    line-height: 1;
    color: #64748B;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-sticky-close-btn:hover {
    color: #0F172A;
    background: #F1F5F9;
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-share-section-top {
        margin: 15px 0 20px 0;
    }

    .ai-share-section-top h4.ai-share-title {
        font-size: 13px !important;
        margin-bottom: 10px;
    }

    .ai-share-buttons-wrap {
        gap: 8px;
    }

    .ai-btn-top {
        padding: 5px 12px;
        font-size: 11.5px;
    }

    .ai-sticky-bar {
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .ai-mobile-grid .ai-share-buttons-wrap {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    .ai-mobile-grid .ai-btn-top {
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .ai-sticky-inner .ai-share-buttons-wrap {
        max-width: 280px;
        justify-content: center;
    }
}
