/* StockThesisAI Theme Styles */

/* Basic fallback layout if Tailwind fails to load */
body { background:#f8f9fb; font-family: 'Inter', system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif; color:#111827; }

/* Darker text pass for better contrast */
.text-gray-500 { color:#6b7280 !important; }
.text-gray-600 { color:#4b5563 !important; }
.text-gray-700 { color:#374151 !important; }
.text-gray-800 { color:#1f2937 !important; }
.text-gray-900 { color:#111827 !important; }

/* Branding: gradient wordmark & nav polish */
.st-brand-gradient { background:linear-gradient(90deg,#6366f1 0%, #6366f1 15%, #4f46e5 35%, #4338ca 55%, #3b82f6 75%, #2563eb 100%); -webkit-background-clip:text; color:transparent; background-clip:text; }
.st-monogram { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:10px; font-weight:700; font-size:16px; letter-spacing:.5px; background:linear-gradient(135deg,#6366f1 0%, #4338ca 60%, #2563eb 100%); color:#fff; box-shadow:0 2px 6px rgba(67,56,202,.25); }
.st-header-accent { position:relative; }
.st-header-accent:before { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background:linear-gradient(90deg,#6366f1,#4338ca,#2563eb); opacity:.25; }
.st-nav-links a { position:relative; padding:0.25rem 0; }
.st-nav-links a:after { content:""; position:absolute; left:0; bottom:-2px; height:2px; width:0; background:linear-gradient(90deg,#6366f1,#2563eb); transition:width .25s ease; border-radius:2px; }
.st-nav-links a:hover:after, .st-nav-links a:focus:after { width:100%; }
.st-nav-login-btn { background:linear-gradient(90deg,#6366f1,#2563eb); }
.st-nav-login-btn:hover { filter:brightness(1.05); }

/* Thesis Slider Enhancements */
.tq-slider-wrap { position:relative; }
.tq-slider-track { background:linear-gradient(90deg,#059669 0%, #9ca3af 50%, #dc2626 100%); height:6px; border-radius:4px; position:relative; }
input[type=range].tq-variant-range { appearance:none; -webkit-appearance:none; width:100%; background:transparent; position:relative; z-index:2; }
input[type=range].tq-variant-range:focus { outline:none; }
input[type=range].tq-variant-range::-webkit-slider-runnable-track { height:6px; background:transparent; }
input[type=range].tq-variant-range::-moz-range-track { height:6px; background:transparent; }
input[type=range].tq-variant-range::-webkit-slider-thumb { -webkit-appearance:none; height:20px; width:20px; border-radius:50%; border:2px solid #fff; box-shadow:0 2px 4px rgba(0,0,0,.25); background:#6b7280; transition:background .25s, box-shadow .25s; cursor:pointer; margin-top:-7px; }
input[type=range].tq-variant-range { cursor:grab; }
input[type=range].tq-variant-range:active { cursor:grabbing; }
/* Smooth visual snap after drag */
input[type=range].tq-variant-range::-webkit-slider-thumb { transition:background .25s, box-shadow .25s, transform .2s ease; }
input[type=range].tq-variant-range::-moz-range-thumb { transition:background .25s, box-shadow .25s, transform .2s ease; }
input[type=range].tq-variant-range::-moz-range-thumb { height:20px; width:20px; border:none; border-radius:50%; box-shadow:0 2px 4px rgba(0,0,0,.25); background:#6b7280; transition:background .25s, box-shadow .25s; cursor:pointer; }
input[type=range].tq-variant-range:active::-webkit-slider-thumb { box-shadow:0 0 0 6px rgba(59,130,246,.25),0 2px 6px rgba(0,0,0,.35); }
input[type=range].tq-variant-range:active::-moz-range-thumb { box-shadow:0 0 0 6px rgba(59,130,246,.25),0 2px 6px rgba(0,0,0,.35); }
.tq-thumb-bull   input[type=range].tq-variant-range::-webkit-slider-thumb { background:#059669; }
.tq-thumb-bull   input[type=range].tq-variant-range::-moz-range-thumb { background:#059669; }
.tq-thumb-base   input[type=range].tq-variant-range::-webkit-slider-thumb { background:#6b7280; }
.tq-thumb-base   input[type=range].tq-variant-range::-moz-range-thumb { background:#6b7280; }
.tq-thumb-bear   input[type=range].tq-variant-range::-webkit-slider-thumb { background:#dc2626; }
.tq-thumb-bear   input[type=range].tq-variant-range::-moz-range-thumb { background:#dc2626; }
.tq-slider-labels { display:flex; justify-content:space-between; font-size:10px; margin-top:6px; color:#4b5563; }
.tq-slider-labels span { position:relative; cursor:help; }
.tq-slider-labels span[data-tip]:hover:after { content:attr(data-tip); position:absolute; left:50%; transform:translateX(-50%); bottom:150%; background:#111827; color:#fff; padding:4px 6px; font-size:10px; white-space:nowrap; border-radius:4px; box-shadow:0 2px 6px rgba(0,0,0,.25); }

/* Fade transitions for thesis content */
.tq-fade { opacity:1; transition:opacity .3s ease; }
.tq-fade.tq-fade-out { opacity:0; }

/* Impacter Card */
.tq-impacter-card { position:relative; border-top-width:4px; }
.tq-badge { font-size:11px; line-height:1; display:inline-block; padding:4px 8px; border-radius:9999px; font-weight:600; letter-spacing:.5px; }
.tq-badge-minor { background:#d1fae5; color:#065f46; }
.tq-badge-moderate { background:#dbeafe; color:#1e40af; }
.tq-badge-major { background:#fee2e2; color:#991b1b; }
.tq-impacter-collapse { overflow:hidden; transition: max-height .35s ease, opacity .35s ease; }
.tq-impacter-collapse.tq-collapsed { max-height:0; opacity:0; }

/* Icon list transform */
.tq-points-list { list-style:none; padding:0; margin:0; }
.tq-points-list li { padding-left:1.4rem; position:relative; margin-bottom:.4rem; font-size:.8125rem; line-height:1.2rem; }
.tq-points-list li:last-child { margin-bottom:0; }
.tq-points-list li span.tq-pt-ic { position:absolute; left:0; top:0; }

/* Section titles (shared with Impacter look) */
.tq-section-title { font-size:0.75rem; font-weight:700; color:#6b7280; margin:0 0 .35rem; letter-spacing:.02em; display:flex; align-items:center; gap:.4rem; }
.tq-section-title .tq-sec-ic { display:inline-block; width:1rem; text-align:center; }

/* Utilities */
.tq-hidden { display:none !important; }

/* Key-Value table used in thesis overview and valuation snapshot */
.tq-kv-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}
.tq-kv-row { display: table-row; }
.tq-kv-key, .tq-kv-val {
    display: table-cell;
    padding: 6px 8px;
    vertical-align: top;
}
.tq-kv-key {
    font-weight: 600;
    width: 28%;
    color: #111827;
    white-space: nowrap;
}
.tq-kv-val {
    font-weight: 400;
    font-size: 0.8125rem; /* match body */
    line-height: 1.35rem; /* match body */
    letter-spacing: .15px; /* match body */
    color: #1f2937;
    overflow-wrap: anywhere;
}

/* Unified Cards & Micro-interactions */
.st-card { background:#fff; border:1px solid #e5e7eb; border-radius:1rem; padding:1.75rem; box-shadow:0 1px 2px rgba(0,0,0,.04); position:relative; transition:box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.st-card:hover { transform:translateY(-3px); box-shadow:0 6px 18px -4px rgba(0,0,0,.15),0 2px 6px rgba(0,0,0,.08); border-color:#d1d5db; }
.st-card h3, .st-card h2 { letter-spacing:-0.015em; }
.st-card p { line-height:1.5; }

/* Tools grid mobile 2-col */
.st-tools-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.5rem; }
@media (min-width:640px){ .st-tools-grid { grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); } }

/* Ticker pills */
.st-ticker-card { background:#fff; border:1px solid #e5e7eb; border-radius:1rem; padding:1.25rem 1.5rem; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.st-ticker-pills { display:flex; flex-wrap:wrap; gap:.5rem; }
.st-ticker-pill { display:inline-block; padding:.35rem .75rem; font-size:.6875rem; font-weight:600; letter-spacing:.5px; text-transform:uppercase; border:1px solid #e5e7eb; border-radius:9999px; background:#f9fafb; color:#374151; transition:background .2s, box-shadow .2s, border-color .2s; }
.st-ticker-pill:hover { background:#f3f4f6; box-shadow:0 1px 4px rgba(0,0,0,.08); }

/* Simple table for tickers list */
.tq-table { width:100%; border-collapse:separate; border-spacing:0; font-size:0.8125rem; }
.tq-table thead th { text-align:left; font-size:0.6875rem; text-transform:uppercase; letter-spacing:.06em; color:#6b7280; padding:0.5rem 0.75rem; border-bottom:1px solid #e5e7eb; }
.tq-table tbody td { padding:0.6rem 0.75rem; border-bottom:1px solid #f1f5f9; color:#111827; }
.tq-table tbody tr:hover { background:#f9fafb; }
.tq-view-btn { display:inline-block; padding:.35rem .6rem; border:1px solid #e5e7eb; border-radius:0.375rem; font-weight:600; font-size:0.6875rem; color:#1e40af; background:#fff; }
.tq-view-btn:hover { background:#eff6ff; border-color:#bfdbfe; }

.st-thesis-shell { display:flex; flex-direction:column; gap:1.25rem; }
.st-thesis-card { background:#fff; border:1px solid #e5e7eb; border-radius:1rem; box-shadow:0 1px 2px rgba(15,23,42,0.05); padding:1.75rem; transition:box-shadow .25s ease, transform .25s ease; }
.st-thesis-card:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(15,23,42,0.08); }
.st-thesis-info { display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap; }
.st-thesis-pill { display:inline-flex; align-items:center; font-size:0.6875rem; text-transform:uppercase; letter-spacing:.08em; font-weight:700; padding:.35rem .75rem; border-radius:9999px; background:rgba(30,64,175,0.08); color:#1e40af; border:1px solid rgba(30,64,175,0.18); }
.st-thesis-pill.variant { background:rgba(17,94,89,0.08); color:#0f766e; border-color:rgba(17,94,89,0.18); }
.st-thesis-meta { display:flex; align-items:center; gap:.75rem; font-size:0.6875rem; color:#6b7280; text-transform:uppercase; letter-spacing:.08em; }
.st-thesis-meta-item { display:inline-flex; align-items:center; gap:.3rem; }
.st-thesis-loading, .st-thesis-error { font-size:0.8125rem; line-height:1.35rem; color:#4b5563; }
.st-thesis-error { color:#b91c1c; }
.st-thesis-heading { font-size:1.1rem; line-height:1.35; margin-bottom:1rem; color:#0f172a; letter-spacing:-0.015em; }
.st-thesis-subheading { font-size:0.95rem; line-height:1.4; margin:1.4rem 0 0.65rem; color:#111827; }
.st-thesis-h3 { font-size:0.9rem; margin:1.1rem 0 0.5rem; color:#1f2937; font-weight:600; }
.st-thesis-h4 { font-size:0.85rem; margin:1rem 0 0.45rem; color:#1f2937; font-weight:600; text-transform:uppercase; letter-spacing:.08em; }
.st-thesis-paragraph { font-size:0.8125rem; line-height:1.5; color:#1f2937; margin:0 0 0.95rem; }
.st-thesis-paragraph:last-child { margin-bottom:0; }
.st-thesis-list { padding-left:1.1rem; margin:0.75rem 0; }
.st-thesis-list.ordered { list-style:decimal; }
.st-thesis-list:not(.ordered) { list-style:disc; }
.st-thesis-list-item { margin:0.35rem 0; }
.st-thesis-inline-code { background:#f3f4f6; border-radius:0.35rem; padding:0.15rem 0.35rem; font-size:0.75rem; }
.st-thesis-pre { background:#0f172a; color:#e2e8f0; padding:1rem 1.25rem; border-radius:0.75rem; font-size:0.75rem; overflow:auto; }
.st-thesis-quote { border-left:4px solid rgba(30,64,175,0.35); background:rgba(30,64,175,0.06); padding:0.85rem 1rem; border-radius:0.6rem; margin:0.9rem 0; color:#1f2937; font-style:italic; }
.st-thesis-table-wrap { width:100%; overflow-x:auto; border:1px solid #e5e7eb; border-radius:0.75rem; margin:1rem 0; }
.st-thesis-thead th { text-transform:uppercase; font-size:0.7rem; letter-spacing:.08em; color:#475569; background:#f8fafc; padding:0.6rem 0.85rem; }
.st-thesis-td { padding:0.65rem 0.85rem; font-size:0.8rem; color:#0f172a; border-top:1px solid #f1f5f9; }

/* Unified body typography for Thesis and Impacter modules */
.st-thesis-body, .st-impacter-body { font-size:0.8125rem; line-height:1.35rem; color:#1f2937; letter-spacing:.15px; }
.st-card h3 { font-size:0.875rem; color:#111827; }
.st-card .st-thesis-body ul, .st-card .st-impacter-body ul { list-style:disc; padding-left:1.25rem; }
.st-card .st-thesis-body li, .st-card .st-impacter-body li { margin:0.25rem 0; }
.st-thesis-body strong, .st-impacter-body strong { font-weight:600; color:#111827; }
.st-thesis-body em, .st-impacter-body em { font-style:italic; }
.st-thesis-body p, .st-impacter-body p { margin:0 0 0.85rem; }
.st-thesis-body p:last-child, .st-impacter-body p:last-child { margin-bottom:0; }
.st-thesis-body a, .st-impacter-body a { color:#1d4ed8; text-decoration:underline; }
.st-thesis-body a:hover, .st-impacter-body a:hover { color:#1e3a8a; }

/* Blog content: blockquotes and horizontal rules */
.st-card .st-thesis-body blockquote {
    background:#f3f4f6; /* gray-100 */
    border-left:4px solid #d1d5db; /* gray-300 */
    padding:0.875rem 1rem;
    border-radius:0.5rem;
    color:#374151; /* gray-700 */
    font-style:italic;
    margin:0.85rem 0;
}
.st-card .st-thesis-body hr {
    border:none;
    border-top:1px solid #e5e7eb; /* gray-200 */
    margin:1rem 0;
}

/* Blog content: generic tables boxed cleanly */
.st-card .overflow-x-auto {
    border:1px solid #e5e7eb; /* gray-200 */
    border-radius:0.75rem;
    overflow:hidden; /* clip rounded corners */
    margin:0.5rem 0 1rem;
}
.st-card table.st-thesis-body { width:100%; border-collapse:separate; border-spacing:0; }
.st-card table.st-thesis-body thead th {
    background:#f9fafb; /* gray-50 */
    padding:0.6rem 0.8rem;
    text-align:left;
    font-weight:600;
    font-size:0.75rem;
    letter-spacing:0.02em;
    color:#374151; /* gray-700 */
    border-bottom:1px solid #e5e7eb;
}
.st-card table.st-thesis-body tbody td {
    padding:0.65rem 0.8rem;
    font-size:0.8125rem;
    color:#111827; /* gray-900 */
    border-top:1px solid #f1f5f9; /* gray-100 */
    vertical-align:top;
}
.st-card table.st-thesis-body tbody tr:nth-child(odd) { background:#fcfcfd; }
.st-card table.st-thesis-body tbody tr:hover { background:#f9fafb; }



/* DataTables input styling overrides */
.dataTables_wrapper input[type="search"],
.dataTables_wrapper select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.875rem;
}
.dataTables_wrapper input[type="search"]:focus,
.dataTables_wrapper select:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6; /* ring-blue-500 */
    border-color: #3b82f6;
}

/* Pagination buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    background: #fff;
    font-size: 0.75rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background:#f9fafb; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #2563eb; /* blue-600 */
    color: #fff !important;
    border-color: #2563eb;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity:.5; cursor:not-allowed; }

/* Table styling */
#transcript-table { width:100%; border-collapse: collapse; }
#transcript-table th {
    background:#f9fafb; /* gray-50 */
    padding:0.75rem 1rem;
    text-align:left;
    font-size:0.75rem; /* text-xs */
    font-weight:600;
    letter-spacing:0.05em; /* tracking-wide */
    text-transform:uppercase;
    color:#6b7280; /* gray-500 */
    border-bottom:1px solid #e5e7eb; /* gray-200 */
}
#transcript-table td {
    padding:0.75rem 1rem;
    font-size:0.875rem;
    color:#111827; /* gray-900 */
    border-bottom:1px solid #e5e7eb;
}
/* Zebra striping & hover */
#transcript-table tbody tr:nth-child(odd) { background:#fcfcfd; }
#transcript-table tbody tr:hover { background:#f1f5f9; }

/* Emphasis for CEO Share column */
.sta-col-ceo-share { font-weight:600; color:#4338ca !important; background:linear-gradient(90deg, rgba(238,242,255,0.6), rgba(255,255,255,0)); }

/* DataTables Buttons */
.dt-button { background:#fff; border:1px solid #d1d5db; color:#374151; padding:0.5rem 0.875rem; border-radius:0.375rem; font-size:0.75rem; font-weight:500; letter-spacing:0.025em; cursor:pointer; transition:background .15s, color .15s, border-color .15s; }
.dt-button:hover { background:#f3f4f6; }
.dt-button:focus { outline:2px solid #6366f1; outline-offset:2px; }
.dt-button.active, .dt-button:active { background:#6366f1; color:#fff; border-color:#6366f1; }
.dt-button-collection .dt-button { display:block; width:100%; text-align:left; }

/* Toasts */
.sta-toast {
    position:fixed; top:1rem; right:1rem; z-index:50; max-width:20rem; padding:1rem; border-radius:0.5rem; box-shadow:0 4px 12px rgba(0,0,0,.15); font-size:0.875rem; line-height:1.25rem; background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af;
}
.sta-toast.success { background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }
.sta-toast.error { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.sta-toast.info { background:#eff6ff; border-color:#bfdbfe; color:#1e3a8a; }

.sta-loading { opacity:.5; pointer-events:none; }

/* Blog feed: make preview card fully clickable with stretched link overlay */
.st-card.st-clickable{ position:relative; }
.st-card.st-clickable:hover{ cursor:pointer; }
.st-stretched-link{ position:absolute; inset:0; z-index:10; border-radius:inherit; color:transparent; }
.st-stretched-link:focus-visible{ outline:2px solid #4F46E5; outline-offset:3px; }

/* Blog feed polish */
.st-feed-card{
    background:#fff;
    border:1px solid rgba(17,24,39,0.06);
    border-radius:1rem; /* ~ rounded-2xl */
    padding:1.25rem; /* ~ p-5 */
    transition:transform .2s ease, box-shadow .2s ease, opacity .4s ease;
    transform:translateY(6px);
    opacity:0;
}
.st-feed-card.is-visible{ transform:translateY(0); opacity:1; }
.st-feed-card:hover{ box-shadow:0 10px 20px rgba(0,0,0,0.05); transform:translateY(-2px); }

#sta-search-wrap{ position:sticky; top:12px; z-index:20; background:#fff; }
.st-pink-tag{ display:inline-block; padding:2px 8px; border-radius:9999px; background:#ffe4e6; color:#be185d; font-size:10px; letter-spacing:.05em; font-weight:700; text-transform:uppercase; }
.st-btn-rose{ background:#f43f5e; color:#fff; }
.st-btn-rose:hover{ background:#e11d48; }
.st-btn-rose:active{ background:#be123c; }
