/* Summarizer Button and Sidebar Styles */

:root {
    --summarizer-primary: #8b5cf6;
    --summarizer-bg: rgba(255, 255, 255, 0.85);
    --summarizer-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Floating / Inline Button */
.btn-resumir {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 6px 16px;
    border-radius: 100px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    text-decoration: none;
}

.btn-resumir:hover {
    background: #f8fafc;
    border-color: var(--summarizer-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.btn-resumir svg {
    width: 18px;
    height: 18px;
}

/* Sidebar Container */
#summarizer-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100vh;
    background: var(--summarizer-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

#summarizer-sidebar.open {
    right: 0;
}

/* Sidebar Header */
.summarizer-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
}

.summarizer-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-summarizer {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.close-summarizer:hover {
    color: #0f172a;
}

/* Sidebar Content */
.summarizer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
}

.summarizer-content h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-top: 20px;
    margin-bottom: 12px;
}

.summarizer-content p {
    margin-bottom: 16px;
}

.summarizer-content strong {
    color: #0f172a;
}

.summarizer-content ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

/* Loading State */
.summarizer-loader {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top: 3px solid var(--summarizer-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Overlay for mobile */
#summarizer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(2px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #summarizer-sidebar {
        width: 100%;
        height: 80vh;
        top: auto;
        bottom: -100%;
        right: 0;
        border-radius: 24px 24px 0 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #summarizer-sidebar.open {
        bottom: 0;
    }
}