/* assets/css/custom.css - UniqueStocks FinTech Design System (Univest White & Blue Aesthetic) */

:root {
    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --border-subtle: #e2e8f0;
    --border-hover: rgba(35, 127, 251, 0.45);
    
    /* Univest Signature Colors */
    --univest-blue: #1C6FE6;
    --univest-blue-light: #237FFB;
    --univest-blue-dark: #00439D;
    --univest-purple: #6F28C0;
    --univest-purple-start: #3B6AEB;
    --univest-green: #10B981;
    --univest-red: #F43F5E;
    --univest-amber: #F59E0B;
}

body {
    background-color: #ffffff;
    background-image: 
        radial-gradient(at 50% 0%, rgba(28, 111, 230, 0.08) 0px, transparent 65%),
        radial-gradient(at 85% 20%, rgba(111, 40, 192, 0.05) 0px, transparent 50%),
        radial-gradient(at 15% 45%, rgba(35, 127, 251, 0.05) 0px, transparent 55%),
        radial-gradient(at 50% 85%, rgba(28, 111, 230, 0.04) 0px, transparent 60%);
    background-attachment: fixed;
    color: #0f172a;
}

/* Continuous Market Ticker */
@keyframes tickerAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: tickerAnimation 45s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

/* Univest-Style Card Containers on White Background */
.obsidian-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.obsidian-card:hover {
    border-color: rgba(35, 127, 251, 0.45);
    box-shadow: 0 16px 36px -6px rgba(28, 111, 230, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    transform: translateY(-2px);
}

/* Univest-Style Badges (Crisp Light Theme) */
.badge-mint {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 700;
}

.badge-cyan, .badge-blue {
    background: #eff6ff;
    color: #1C6FE6;
    border: 1px solid #bfdbfe;
    font-weight: 700;
}

.badge-purple {
    background: #faf5ff;
    color: #6F28C0;
    border: 1px solid #e9d5ff;
    font-weight: 700;
}

.badge-amber {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    font-weight: 700;
}

.badge-crimson {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    font-weight: 700;
}

/* Univest Pro Gradient Pill */
.badge-univest-pro {
    background: linear-gradient(92deg, #3B6AEB 0%, #6F28C0 94.1%);
    color: #ffffff;
    font-weight: 800;
}

/* Text Gradients */
.text-gradient-univest {
    color: #1C6FE6;
}

.text-gradient-primary {
    background: linear-gradient(180deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-mint {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-cyber {
    color: #1C6FE6;
}

/* Pulsating Live Dot */
@keyframes neonPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.25); }
}

.neon-dot {
    animation: neonPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Pro Lock Blur on White */
.pro-blur-overlay {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.90);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1C6FE6;
}

/* Light Mode Table and General Form Controls */
table thead {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

table thead th {
    color: #475569 !important;
}

table tbody tr {
    border-color: #f1f5f9 !important;
}

table tbody td {
    color: #334155;
}

/* Form input defaults */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
    color: #0f172a;
}

/* ==============================================================
   LIGHT THEME GLOBAL CONTRAST & TYPOGRAPHY CORRECTION (Univest Style)
   ============================================================== */

/* ELIMINATE ANY TEXT SHADOW ACROSS THE ENTIRE PLATFORM */
*, *::before, *::after {
    text-shadow: none !important;
}

/* Ensure default text is dark slate */
body {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Headings: Any heading with text-white that is NOT inside a dark button/badge/gradient banner */
h1.text-white:not(button *):not(.bg-gradient-to-r *):not(.bg-gradient-to-tr *):not(.bg-\[\#1C6FE6\] *):not(.bg-\[\#6F28C0\] *):not(.badge-mint *):not(.badge-blue *):not(.badge-univest-pro *):not([class*="from-\[\#0F172A\]"] *):not([class*="from-\[\#07132a\]"] *):not([class*="from-\[\#091833\]"] *),
h2.text-white:not(button *):not(.bg-gradient-to-r *):not(.bg-gradient-to-tr *):not(.bg-\[\#1C6FE6\] *):not(.bg-\[\#6F28C0\] *):not(.badge-mint *):not(.badge-blue *):not(.badge-univest-pro *):not([class*="from-\[\#0F172A\]"] *):not([class*="from-\[\#07132a\]"] *):not([class*="from-\[\#091833\]"] *),
h3.text-white:not(button *):not(.bg-gradient-to-r *):not(.bg-gradient-to-tr *):not(.bg-\[\#1C6FE6\] *):not(.bg-\[\#6F28C0\] *):not(.badge-mint *):not(.badge-blue *):not(.badge-univest-pro *):not([class*="from-\[\#0F172A\]"] *):not([class*="from-\[\#07132a\]"] *):not([class*="from-\[\#091833\]"] *),
h4.text-white:not(button *):not(.bg-gradient-to-r *):not(.bg-gradient-to-tr *):not(.bg-\[\#1C6FE6\] *):not(.bg-\[\#6F28C0\] *):not(.badge-mint *):not(.badge-blue *):not(.badge-univest-pro *):not([class*="from-\[\#0F172A\]"] *):not([class*="from-\[\#07132a\]"] *):not([class*="from-\[\#091833\]"] *),
h5.text-white:not(button *):not(.bg-gradient-to-r *):not(.bg-gradient-to-tr *):not(.bg-\[\#1C6FE6\] *):not(.bg-\[\#6F28C0\] *):not(.badge-mint *):not(.badge-blue *):not(.badge-univest-pro *):not([class*="from-\[\#0F172A\]"] *):not([class*="from-\[\#07132a\]"] *):not([class*="from-\[\#091833\]"] *) {
    color: #0f172a !important;
}

/* Any standalone .text-white inside cards or white surfaces that isn't inside a button/badge/gradient */
.obsidian-card h1, .obsidian-card h2, .obsidian-card h3, .obsidian-card h4, .obsidian-card h5 {
    color: #0f172a !important;
}

/* FIX ACTION BUTTON TEXT COLORS: Solid and gradient action buttons MUST strictly keep white text in ALL states */
button.text-white,
button.text-white:hover,
button.text-white:focus,
a.text-white,
a.text-white:hover,
a.text-white:focus,
a[class*="bg-[#1C6FE6]"],
a[class*="bg-[#1C6FE6]"]:hover,
a[class*="bg-[#1C6FE6]"]:focus,
a[class*="bg-[#1a6de0]"],
a[class*="bg-[#1a6de0]"]:hover,
a[class*="bg-[#1a6de0]"]:focus,
a[class*="bg-[#6F28C0]"],
a[class*="bg-[#6F28C0]"]:hover,
a[class*="bg-[#6F28C0]"]:focus,
a[class*="from-[#3B6AEB]"],
a[class*="from-[#3B6AEB]"]:hover,
a[class*="from-[#3B6AEB]"]:focus,
a[class*="from-"],
a[class*="from-"]:hover,
a[class*="from-"]:focus,
a[class*="bg-emerald-"],
a[class*="bg-emerald-"]:hover,
a[class*="bg-emerald-"]:focus,
button[class*="bg-[#1C6FE6]"],
button[class*="bg-[#1C6FE6]"]:hover,
button[class*="bg-[#1C6FE6]"]:focus,
button[class*="bg-[#6F28C0]"],
button[class*="bg-[#6F28C0]"]:hover,
button[class*="bg-[#6F28C0]"]:focus,
button[class*="from-[#3B6AEB]"],
button[class*="from-[#3B6AEB]"]:hover,
button[class*="from-[#3B6AEB]"]:focus,
button[class*="from-"],
button[class*="from-"]:hover,
button[class*="from-"]:focus,
.obsidian-card a[class*="bg-[#1C6FE6]"],
.obsidian-card a[class*="bg-[#1C6FE6]"]:hover,
.obsidian-card a[class*="bg-[#6F28C0]"],
.obsidian-card a[class*="bg-[#6F28C0]"]:hover,
.obsidian-card a[class*="from-"],
.obsidian-card a[class*="from-"]:hover,
.obsidian-card button[class*="bg-[#1C6FE6]"],
.obsidian-card button[class*="bg-[#1C6FE6]"]:hover,
.obsidian-card button[class*="bg-[#6F28C0]"],
.obsidian-card button[class*="bg-[#6F28C0]"]:hover,
.obsidian-card button[class*="from-"],
.obsidian-card button[class*="from-"]:hover,
.badge-univest-pro,
.badge-univest-pro:hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

/* Only plain text links that have NO background color turn blue on hover */
.obsidian-card a:not([class*="bg-"]):not([class*="badge-"]):hover {
    color: #1C6FE6 !important;
    text-shadow: none !important;
}

/* Secondary light buttons hover state */
a[class*="bg-slate-100"]:hover,
button[class*="bg-slate-100"]:hover {
    color: #0f172a !important;
    text-shadow: none !important;
}

/* Upgrade washed-out slate text to high-contrast legible slate on white backgrounds */
p.text-slate-300, p.text-slate-400,
span.text-slate-300, span.text-slate-400:not(.ticker-track *),
div.text-slate-300, div.text-slate-400 {
    color: #475569 !important;
}

p.text-slate-500,
span.text-slate-500:not(.ticker-track *),
div.text-slate-500 {
    color: #475569 !important;
}

p.text-slate-600,
span.text-slate-600:not(.ticker-track *),
div.text-slate-600 {
    color: #334155 !important;
}

/* Fix legacy dark surfaces to be clean off-white */
.bg-obsidian {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

.bg-surface, .bg-cardbg {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

/* Fix borders that were previously white/[0.06] or white/10 or slate-800 */
[class*="border-white"], .border-slate-800, .border-slate-700 {
    border-color: #e2e8f0 !important;
}

/* Fix text gradients */
.text-gradient-mint {
    color: #059669 !important;
    -webkit-text-fill-color: #059669 !important;
}

.text-gradient-cyber {
    color: #1C6FE6 !important;
    -webkit-text-fill-color: #1C6FE6 !important;
}
