/* Custom styles for StockPulse Quant & AI Portal (Mobile-First Optimized) */

/* Touch-action and tap highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea {
    touch-action: manipulation;
}

/* Safe area support for iOS / Modern mobile browsers */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 1rem);
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Hide scrollbar for clean horizontal chip bars */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Markdown typography mobile-first improvements */
.markdown-rendered h1, .prose h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 0.35rem;
}
.markdown-rendered h2, .prose h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 0.2rem;
}
.markdown-rendered h3, .prose h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
}
.markdown-rendered p, .prose p {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}
.markdown-rendered ul, .prose ul {
    list-style-type: disc;
    margin-left: 1rem;
    margin-bottom: 0.6rem;
}
.markdown-rendered ol, .prose ol {
    list-style-type: decimal;
    margin-left: 1rem;
    margin-bottom: 0.6rem;
}
.markdown-rendered code, .prose code {
    background-color: #090d16;
    color: #34d399;
    padding: 0.15rem 0.35rem;
    border-radius: 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82em;
    border: 1px solid #1e293b;
}
.markdown-rendered pre, .prose pre {
    background-color: #050811;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    padding: 0.75rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}
.markdown-rendered pre code, .prose pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    color: #cbd5e1;
    font-size: 0.8rem;
}
.markdown-rendered table, .prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.75rem;
    display: block;
    overflow-x: auto;
}
.markdown-rendered th, .prose th {
    background-color: #0f172a;
    color: #94a3b8;
    border: 1px solid #1e293b;
    padding: 0.4rem 0.6rem;
    text-align: left;
    white-space: nowrap;
}
.markdown-rendered td, .prose td {
    border: 1px solid #1e293b;
    padding: 0.4rem 0.6rem;
}
.markdown-rendered tr:hover, .prose tr:hover {
    background-color: rgba(30, 41, 59, 0.4);
}
.markdown-rendered blockquote, .prose blockquote {
    border-left: 3px solid #10b981;
    padding-left: 0.75rem;
    margin: 0.75rem 0;
    color: #94a3b8;
    background-color: rgba(15, 23, 42, 0.4);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    border-radius: 0 0.5rem 0.5rem 0;
}
