/**
 * Treendly VC - Custom Styles
 *
 * Most styling is handled by Tailwind via CDN.
 * This file adds custom utilities and overrides.
 */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Line clamp (fallback for older browsers) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Chart container responsiveness */
canvas {
    max-width: 100%;
}

/* Alpine.js cloak - hide elements before Alpine initializes */
[x-cloak] {
    display: none !important;
}

/* Transition utilities for Alpine */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.15s ease;
}
.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* Treendly-main coherence: Nunito font tuning */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4 {
    font-weight: 700;
}

/* Match treendly-main's rounded button style */
button, a[href] {
    transition: all 0.15s ease;
}

/* Treendly-main card shadow style */
.card-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Signal type colors as CSS variables (for dynamic use) */
:root {
    --signal-trend: #10b981;
    --signal-hiring: #3b82f6;
    --signal-funding: #8b5cf6;
    --signal-partnership: #f59e0b;
    --signal-launch: #ec4899;
    --signal-press: #06b6d4;
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* ── Dark Mode ──────────────────────────────────────────── */

/* Base surfaces */
.dark body { background-color: #0f172a; color: #e2e8f0; }

/* Cards and panels */
.dark .bg-white { background-color: #1e293b !important; }
.dark .bg-gray-50 { background-color: #0f172a !important; }
.dark .bg-gray-100 { background-color: #1e293b !important; }

/* Borders */
.dark .border-gray-200, .dark .border-gray-100 { border-color: #334155 !important; }
.dark .border-gray-50 { border-color: #1e293b !important; }

/* Text */
.dark .text-gray-900 { color: #f1f5f9 !important; }
.dark .text-gray-800 { color: #e2e8f0 !important; }
.dark .text-gray-700 { color: #cbd5e1 !important; }
.dark .text-gray-600 { color: #94a3b8 !important; }
.dark .text-gray-500 { color: #64748b !important; }
.dark .text-gray-400 { color: #475569 !important; }

/* Inputs */
.dark input, .dark select, .dark textarea {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
.dark input::placeholder, .dark textarea::placeholder {
    color: #475569 !important;
}

/* Tables */
.dark thead.bg-gray-50 { background-color: #1e293b !important; }
.dark tbody .hover\:bg-gray-50:hover { background-color: #334155 !important; }
.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #334155; }
.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #1e293b; }
.dark .divide-gray-50 > :not([hidden]) ~ :not([hidden]) { border-color: #1e293b; }

/* Dropdown menus */
.dark .bg-white.rounded-lg.shadow-lg { background-color: #1e293b !important; border-color: #334155 !important; }

/* Hover states */
.dark .hover\:bg-gray-50:hover { background-color: #334155 !important; }
.dark .hover\:border-brand-300:hover { border-color: #6366f1 !important; }

/* Score badges - keep vibrant */
.dark .bg-emerald-100 { background-color: rgba(16, 185, 129, 0.15) !important; }
.dark .bg-amber-100 { background-color: rgba(245, 158, 11, 0.15) !important; }

/* Signal tag backgrounds */
.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.1) !important; }
.dark .bg-blue-50 { background-color: rgba(59, 130, 246, 0.1) !important; }
.dark .bg-purple-50 { background-color: rgba(139, 92, 246, 0.1) !important; }
.dark .bg-amber-50 { background-color: rgba(245, 158, 11, 0.1) !important; }
.dark .bg-rose-50 { background-color: rgba(244, 63, 94, 0.1) !important; }
.dark .bg-pink-50 { background-color: rgba(236, 72, 153, 0.1) !important; }
.dark .bg-cyan-50 { background-color: rgba(6, 182, 212, 0.1) !important; }
.dark .bg-violet-50 { background-color: rgba(139, 92, 246, 0.1) !important; }
.dark .bg-teal-50 { background-color: rgba(20, 184, 166, 0.1) !important; }

/* Brand backgrounds in dark */
.dark .bg-brand-50 { background-color: rgba(99, 102, 241, 0.1) !important; }
.dark .bg-brand-100 { background-color: rgba(99, 102, 241, 0.15) !important; }

/* Plan badge */
.dark .bg-gray-100.text-gray-600 { background-color: #334155 !important; color: #94a3b8 !important; }

/* Footer - already dark, no changes needed */

/* Scrollbar */
.dark ::-webkit-scrollbar-track { background: #1e293b; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }
.dark ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Code blocks */
.dark pre { background-color: #0f172a !important; }
.dark code { color: #e2e8f0; }

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    body {
        background: white;
    }
}
