/* Copilot chat panel styles */

/* Message bubbles */
.copilot-bubble-user,
.copilot-bubble-assistant {
    font-size: 0.85em;
    font-weight: 300;
    padding: 0.4em 0.6em;
    border-radius: 4px;
    word-break: break-word;
}

.copilot-bubble-user {
    background-color: #f1f1f1;
    white-space: pre-wrap;
}

.copilot-bubble-assistant {
    background-color: #f8f9fa;
}

/* Timestamp / meta */
.copilot-meta {
    font-size: 0.7em;
    font-weight: 300;
    color: #6c757d;
    margin-bottom: 2px;
}

/* Scoped markdown inside assistant bubbles */
.copilot-md {
    font-size: 0.9em;
    line-height: 1.45;
}

.copilot-md p {
    margin: 0 0 0.4em 0;
}

.copilot-md p:last-child {
    margin-bottom: 0;
}

.copilot-md h1,
.copilot-md h2,
.copilot-md h3,
.copilot-md h4,
.copilot-md h5,
.copilot-md h6 {
    margin: 0.6em 0 0.3em 0;
    font-weight: 600;
    line-height: 1.25;
}

.copilot-md h1 { font-size: 1.15em; }
.copilot-md h2 { font-size: 1.1em; }
.copilot-md h3 { font-size: 1.05em; }
.copilot-md h4,
.copilot-md h5,
.copilot-md h6 { font-size: 1em; }

.copilot-md ul,
.copilot-md ol {
    margin: 0.3em 0;
    padding-left: 1.4em;
}

.copilot-md li {
    margin-bottom: 0.15em;
}

.copilot-md blockquote {
    margin: 0.4em 0;
    padding: 0.2em 0.6em;
    border-left: 3px solid #dee2e6;
    color: #6c757d;
}

.copilot-md hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 0.5em 0;
}

.copilot-md a {
    color: #1d1d1d;
    text-decoration: underline;
}

.copilot-md strong {
    font-weight: 600;
}

/* Images */
.copilot-md img,
.copilot-md .copilot-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.25em 0;
    display: block;
}

/* Inline code */
.copilot-md code {
    background-color: #e9ecef;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.88em;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
}

/* Code blocks - override inline code style inside pre */
.copilot-md pre {
    position: relative;
    margin: 0.5em 0;
    border-radius: 4px;
    overflow-x: auto;
}

.copilot-md pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.85em;
}

/* Code header with language label + copy button */
.copilot-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25em 0.6em;
    background-color: #1d1d1d;
    border-bottom: 1px solid #3a3a3a;
    font-size: 0.75em;
    color: #a0a0a0;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    border-radius: 4px 4px 0 0;
}

.copilot-code-header button {
    background: none;
    border: 1px solid #555;
    color: #ccc;
    padding: 0.1em 0.5em;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    font-family: inherit;
}

.copilot-code-header button:hover {
    background-color: #333;
    color: #fff;
}

/* Tables */
.copilot-md table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.4em 0;
    font-size: 0.92em;
}

.copilot-md th,
.copilot-md td {
    border: 1px solid #dee2e6;
    padding: 0.25em 0.5em;
    text-align: left;
}

.copilot-md th {
    background-color: #f1f1f1;
    font-weight: 600;
}

/* Typing indicator - three bouncing dots */
.copilot-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.4em 0.6em;
}

.copilot-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #6c757d;
    animation: copilot-bounce 1.2s ease-in-out infinite;
}

.copilot-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.copilot-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes copilot-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}
