.ai-summary-container {
    background: #ffffff;
    border: 1px solid rgba(114, 102, 186, 0.15);
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.8;
    color: #3f4854;
    position: relative;
    box-shadow: 0 8px 24px rgba(38, 38, 38, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block !important;
}

.ai-summary-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: #5e53c1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
}

.ai-summary-header svg {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    stroke-width: 2.4;
}

.ai-summary-text {
    min-height: 24px;
    position: relative;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    background-color: #7266ba;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

html.theme-dark .ai-summary-container {
    background: #1e1e1e;
    color: #dcdcdc;
    border-color: rgba(144, 132, 227, 0.25);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

html.theme-dark .ai-summary-header {
    color: #9084e3;
}

html.theme-dark .cursor {
    background-color: #9084e3;
}

.ai-summary-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    color: #5e53c1;
    background: rgba(114, 102, 186, 0.12);
}

html.theme-dark .ai-summary-status {
    color: #b5adff;
    background: rgba(144, 132, 227, 0.18);
}

.ai-summary-container:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(38, 38, 38, 0.08);
}

.ai-summary-text.loading {
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 37%, rgba(0,0,0,0.04) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    min-height: 20px;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

html.theme-dark .ai-summary-text.loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.05) 63%);
}

.ai-summary-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ai-summary-toggle {
    font-size: 12px;
    color: #5e53c1;
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.ai-summary-toggle:hover {
    background: rgba(114, 102, 186, 0.12);
}

html.theme-dark .ai-summary-toggle {
    color: #b5adff;
}

.ai-summary-text.clamp {
    max-height: 72px;
    overflow: hidden;
}
