/**
 * SEVN AI Summary - Stylesheet
 * Version: 1.3.4
 */

.sevn-ai-summary {
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    font-family: inherit;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sevn-ai-summary:hover {
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

.sevn-ai-summary__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #edf2f7;
}

.sevn-ai-summary__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
    line-height: 1;
}

.sevn-ai-summary__icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.sevn-ai-summary__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.sevn-ai-summary__content {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #334155;
}

.sevn-ai-summary__content p {
    margin: 0 0 0.85rem 0;
}

.sevn-ai-summary__content p:last-child {
    margin-bottom: 0;
}

.sevn-ai-summary__content strong {
    font-weight: 600;
    color: #0f172a;
}

/* Headings inside summary */
.sevn-ai-summary__content h3,
.sevn-ai-summary__content .sevn-summary-heading {
    margin: 1.15rem 0 0.5rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.sevn-ai-summary__content h4 {
    margin: 1rem 0 0.45rem 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

/* Lists inside summary */
.sevn-ai-summary__content ul,
.sevn-ai-summary__content .sevn-summary-list {
    margin: 0.5rem 0 0.85rem 1.4rem;
    padding: 0;
    list-style-type: disc;
}

.sevn-ai-summary__content ol,
.sevn-ai-summary__content .sevn-summary-ordered-list {
    margin: 0.5rem 0 0.85rem 1.4rem;
    padding: 0;
    list-style-type: decimal;
}

.sevn-ai-summary__content li {
    margin-bottom: 0.4rem;
    line-height: 1.65;
}

.sevn-ai-summary__content li:last-child {
    margin-bottom: 0;
}

/* Horizontal Rule */
.sevn-ai-summary__content hr,
.sevn-ai-summary__content .sevn-summary-hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.15rem 0;
}

/* Tables inside summary */
.sevn-summary-table-wrap {
    overflow-x: auto;
    margin: 0.9rem 0;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.sevn-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

.sevn-summary-table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    padding: 9px 12px;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
}

.sevn-summary-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: top;
}

.sevn-summary-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.sevn-summary-table tbody tr:last-child td {
    border-bottom: none;
}

/* Skeleton Loader & Live Animations */
@keyframes sevnShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes sevnPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.6; }
}

.sevn-ai-pulse {
    animation: sevnPulse 2s ease-in-out infinite;
}

.sevn-ai-summary--loading {
    border-style: dashed;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.sevn-ai-skeleton .sevn-skeleton-line {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 9px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: sevnShimmer 1.5s infinite ease-in-out;
}

.sevn-ai-skeleton .sevn-skeleton-line:last-child {
    margin-bottom: 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .sevn-ai-summary {
        background: #1e293b;
        border-color: #334155;
        border-left-color: #38bdf8;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .sevn-ai-summary--loading {
        background: #0f172a;
        border-color: #334155;
    }

    .sevn-ai-skeleton .sevn-skeleton-line {
        background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
        background-size: 200% 100%;
    }

    .sevn-ai-summary__header {
        border-bottom-color: #334155;
    }

    .sevn-ai-summary__icon {
        color: #38bdf8;
    }

    .sevn-ai-summary__title {
        color: #f1f5f9;
    }

    .sevn-ai-summary__content {
        color: #cbd5e1;
    }

    .sevn-ai-summary__content strong {
        color: #f1f5f9;
    }

    .sevn-ai-summary__content h3,
    .sevn-ai-summary__content h4,
    .sevn-ai-summary__content .sevn-summary-heading {
        color: #f1f5f9;
    }

    .sevn-ai-summary__content hr,
    .sevn-ai-summary__content .sevn-summary-hr {
        border-top-color: #334155;
    }

    .sevn-summary-table-wrap {
        border-color: #334155;
        background: #0f172a;
    }

    .sevn-summary-table th {
        background: #273549;
        color: #f1f5f9;
        border-bottom-color: #475569;
    }

    .sevn-summary-table td {
        border-bottom-color: #334155;
        color: #cbd5e1;
    }

    .sevn-summary-table tbody tr:nth-child(even) td {
        background: #162032;
    }
}
