﻿.ai-analysis-card {
    position: relative;
    width: 100%;
    background: #fff;
    border: 1px solid #e1e5eb;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    color: #172033;
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* --------------------------------
   Header
-------------------------------- */
.ai-analysis-header {
    padding: 24px 28px 18px 28px;
    border-bottom: 1px solid #e8ebf0;
    background-color: #ffffff;
    background-image: url('https://substatic.findhs.codes/img/bg/blue_lines.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
   
}

#aiExplanation {
  
}
.ai-markdown-header {
    background-image: url('https://substatic.findhs.codes/img/bg/blue_lines.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: #ffffff;
    padding: 30px;
    padding-top: -30px;
}
.ai-markdown-header span {
    font-family: "JetBrains Mono", monospace !important;
}

.ai-markdown-header{
    font-family: "JetBrains Mono", monospace !important;
}
/* --------------------------------
   Footer
-------------------------------- */

.ai-analysis-footer-container {
    background: #fafbfc;
    border-top: 1px solid #edf0f3;
}
.ai-analysis-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 20px 16px 28px;
   
}

.ai-disclaimer {
    border-top: 1px solid #edf0f3;
    font-family: "JetBrains Mono", monospace !important;
    font-size: 12px !important;
    padding: 5px;
    color: #4b5563;
}
/* AI generated indicator */
.ai-analysis-progress {
    display: flex;
    align-items: center;
    color: #8791a3;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2px;
}

.ai-progress-dot {
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: #7957e8;
}


/* Continue button */

.ai-continue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 13px;
    border: 1px solid #ddd5ff;
    border-radius: 7px;
    background: #ffffff;
    color: #6844d8;
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ai-continue-arrow {
    margin-left: 7px;
    font-size: 15px;
    line-height: 1;
    transition: transform .18s ease;
}

.ai-continue-btn:hover {
    background: #f7f4ff;
    border-color: #cfc3ff;
    box-shadow: 0 3px 10px rgba(121, 87, 232, .12);
}

    .ai-continue-btn:hover .ai-continue-arrow {
        transform: translateX(3px);
    }

.ai-continue-btn:active {
    transform: translateY(1px);
}



.ai-markdown {
    position: relative;
    padding: 22px 24px;
    color: #374151;
    font-size: 14px;
    line-height: 1.65;
    font-family: "JetBrains Mono", monospace;
}

    /* =========================================
   Typography
   ========================================= */

    .ai-markdown h1,
    .ai-markdown h2,
    .ai-markdown h3,
    .ai-markdown h4 {
        color: #1f2937;
        font-weight: 600;
        line-height: 1.35;
    }

    .ai-markdown h1 {
        margin: 0 0 18px;
        font-size: 22px;
    }

    .ai-markdown h2 {
        position: relative;
        margin: 28px 0 13px;
        padding: 0 0 8px;
        font-size: 18px;
        border-bottom: 1px solid #e5e7eb;
    }

        .ai-markdown h2:first-child {
            margin-top: 0;
        }

    .ai-markdown h3 {
        margin: 22px 0 10px;
        font-size: 16px;
    }

    .ai-markdown h4 {
        margin: 18px 0 8px;
        font-size: 14px;
    }

    .ai-markdown p {
        margin: 0 0 13px;
    }

        .ai-markdown p:last-child {
            margin-bottom: 0;
        }

    .ai-markdown strong {
        color: #1f2937;
        font-weight: 600;
    }

    .ai-markdown em {
        color: #4b5563;
    }


    /* =========================================
   Lists
   ========================================= */

    .ai-markdown ul,
    .ai-markdown ol {
        margin: 8px 0 16px;
        padding-left: 24px;
    }

    .ai-markdown li {
        margin: 5px 0;
        padding-left: 2px;
        font-family: "JetBrains Mono", monospace;
    }

        .ai-markdown li::marker {
            color: #8b5cf6;
        }

    .ai-markdown ul ul,
    .ai-markdown ol ol,
    .ai-markdown ul ol,
    .ai-markdown ol ul {
        margin-top: 5px;
        margin-bottom: 5px;
    }


    /* =========================================
   Links
   ========================================= */

    .ai-markdown a {
        color: #2563eb;
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: border-color .15s ease;
    }

        .ai-markdown a:hover {
            color: #1d4ed8;
            text-decoration: none;
            border-bottom-color: #1d4ed8;
        }


    /* =========================================
   Tables
   ========================================= */

    .ai-markdown table {
        width: 100%;
        max-width: 100%;
        margin: 18px 0 22px;
        border-collapse: separate;
        border-spacing: 0;
        border: 1px solid #e2e6ea;
        border-radius: 6px;
        overflow: hidden;
        background: #fff;
        font-size: 13px;
    }

    .ai-markdown thead th {
        padding: 11px 12px;
        background: #f7f8fa;
        color: #374151;
        font-weight: 600;
        text-align: left;
        vertical-align: middle;
        border-bottom: 1px solid #dfe3e8;
    }

    .ai-markdown tbody td {
        padding: 10px 12px;
        color: #4b5563;
        vertical-align: top;
        border-bottom: 1px solid #edf0f2;
    }

    .ai-markdown tbody tr:last-child td {
        border-bottom: 0;
    }

    .ai-markdown tbody tr {
        transition: background-color .12s ease;
    }

        .ai-markdown tbody tr:hover {
            background: #fafbfc;
        }


    /* =========================================
   Code
   ========================================= */

    .ai-markdown code {
        display: inline-block;
        padding: 2px 6px;
        margin: 0 1px;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        border-radius: 4px;
        color: #374151;
        font-size: 12px;
        font-family: Consolas, Monaco, monospace;
    }

    .ai-markdown pre {
        margin: 16px 0;
        padding: 14px 16px;
        overflow-x: auto;
        background: #f7f8fa;
        border: 1px solid #e2e6ea;
        border-radius: 6px;
    }

        .ai-markdown pre code {
            display: block;
            padding: 0;
            margin: 0;
            background: transparent;
            border: 0;
            font-size: 12px;
        }


    /* =========================================
   Blockquote
   ========================================= */

    .ai-markdown blockquote {
        margin: 16px 0;
        padding: 12px 16px;
        background: #f8f9fb;
        border-left: 3px solid #8b5cf6;
        border-radius: 0 5px 5px 0;
        color: #4b5563;
    }

        .ai-markdown blockquote p:last-child {
            margin-bottom: 0;
        }


    /* =========================================
   Horizontal Rule
   ========================================= */

    .ai-markdown hr {
        height: 1px;
        margin: 24px 0;
        border: 0;
        background: #e5e7eb;
    }


    /* =========================================
   Images
   ========================================= */

    .ai-markdown img {
        max-width: 100%;
        height: auto;
        margin: 10px 0;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
    }


/* =========================================
   Responsive
   ========================================= */

@media (max-width: 767px) {

    .ai-markdown {
        padding: 16px;
        font-size: 13px;
    }

        .ai-markdown h1 {
            font-size: 20px;
        }

        .ai-markdown h2 {
            font-size: 17px;
        }

        .ai-markdown table {
            display: block;
            overflow-x: auto;
            white-space: nowrap;
        }

        .ai-markdown thead th,
        .ai-markdown tbody td {
            padding: 8px 10px;
        }
}



/* ---------------------------------------------------------
   COMPLETE
--------------------------------------------------------- */

.ai-analysis-complete {
    display: none;
    align-items: center;
    gap: 6px;
    font-family: "JetBrains Mono", monospace !important;
    font-size: 10px !important;
    line-height: 1;
    color: #687385;
    white-space: nowrap;
}

.ai-complete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e9f7ef;
    color: #2c9b5b;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
}


/* =========================================================
   COMPLETE STATE
========================================================= */

.ai-analysis-card.ai-complete
.ai-analysis-status {
    display: none;
}

.ai-analysis-card.ai-complete
.ai-analysis-complete {
    display: flex;
}

.ai-analysis-card.ai-complete
.ai-stream-cursor {
    display: none;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 600px) {

    .ai-analysis-header {
        padding: 12px 14px;
    }

    .ai-analysis-status {
        font-size: 9px !important;
    }

    .ai-markdown {
        padding: 18px 16px 20px;
        font-size: 13px !important;
    }

    .ai-analysis-footer {
        padding: 11px 14px;
    }

    .ai-disclaimer {
        font-size: 9px !important;
    }

    .ai-analysis-complete {
        font-size: 9px !important;
    }
}

