/* Markdown Content Styling for AI Chat */
.markdown-content {
    line-height: 1.6;
}

.markdown-content p {
    margin: 0.5em 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.markdown-content h1 { font-size: 1.75em; }
.markdown-content h2 { font-size: 1.5em; }
.markdown-content h3 { font-size: 1.25em; }
.markdown-content h4 { font-size: 1.1em; }
.markdown-content h5 { font-size: 1em; }
.markdown-content h6 { font-size: 0.9em; }

.markdown-content ul,
.markdown-content ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.markdown-content li {
    margin: 0.25em 0;
}

.markdown-content code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.125em 0.25em;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 1em;
    overflow-x: auto;
    margin: 1em 0;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.85em;
    line-height: 1.45;
}

.markdown-content blockquote {
    border-left: 4px solid #dfe2e5;
    padding-left: 1em;
    margin: 1em 0;
    color: #6a737d;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #dfe2e5;
    padding: 0.5em;
}

.markdown-content table th {
    background-color: #f6f8fa;
    font-weight: 600;
}

.markdown-content a {
    color: #0366d6;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid #e1e4e8;
    margin: 1.5em 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
}

/* Dark theme adjustments - will be applied by MudBlazor's theme system */
.mud-theme-dark .markdown-content code {
    background-color: rgba(255, 255, 255, 0.1);
}

.mud-theme-dark .markdown-content pre {
    background-color: #2d2d2d;
    border-color: #444;
}

.mud-theme-dark .markdown-content blockquote {
    border-left-color: #444;
    color: #aaa;
}

.mud-theme-dark .markdown-content table th,
.mud-theme-dark .markdown-content table td {
    border-color: #444;
}

.mud-theme-dark .markdown-content table th {
    background-color: #2d2d2d;
}

/* Thinking Indicator Animation */
.thinking-icon {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Animated dots for "Thinking..." */
.thinking-dot {
    animation: blink 1.4s infinite;
    opacity: 0;
}

.thinking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

.thinking-text {
    font-style: italic;
}

/* Action Link Chip Styling (inline clickable chips) */
.action-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin: 2px 4px;
    background: linear-gradient(135deg, #78909C 0%, #607D8B 100%);
    color: white;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    user-select: none;
    white-space: nowrap;
}

.action-link-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #90A4AE 0%, #78909C 100%);
}

.action-link-chip:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Click feedback animation */
.action-link-clicked {
    animation: chipClick 0.3s ease;
}

@keyframes chipClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.action-link-icon {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.action-link-text {
    line-height: 1;
    cursor: pointer;
}

/* Dark theme adjustments for action links */
.mud-theme-dark .action-link-chip {
    background: linear-gradient(135deg, #546E7A 0%, #455A64 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mud-theme-dark .action-link-chip:hover {
    background: linear-gradient(135deg, #607D8B 0%, #546E7A 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Specific action type styling variants */
.action-link-chip[data-action="photo"] {
    background: linear-gradient(135deg, #7986CB 0%, #5C6BC0 100%);
}

.action-link-chip[data-action="photo"]:hover {
    background: linear-gradient(135deg, #9FA8DA 0%, #7986CB 100%);
}

.action-link-chip[data-action="pdf"] {
    background: linear-gradient(135deg, #A1887F 0%, #8D6E63 100%);
}

.action-link-chip[data-action="pdf"]:hover {
    background: linear-gradient(135deg, #BCAAA4 0%, #A1887F 100%);
}

.action-link-chip[data-action="navigate"] {
    background: linear-gradient(135deg, #4DB6AC 0%, #26A69A 100%);
}

.action-link-chip[data-action="navigate"]:hover {
    background: linear-gradient(135deg, #80CBC4 0%, #4DB6AC 100%);
}
