/* Trade Time - Main Styles */
/* Version: v3.0.0 */

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse-slow {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Transition pulse — used by useTransitionPulse hook to highlight an exchange
   card when its status changes (closed -> opening_soon -> main_open -> ...).
   Visual: a soft blue ring that grows outward and fades over 3 seconds. */
@keyframes tradetime-transition-pulse {
    0%   { box-shadow: 0 0 0 0px rgba(59, 130, 246, 0.6); }
    30%  { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.35); }
    100% { box-shadow: 0 0 0 16px rgba(59, 130, 246, 0); }
}

.tradetime-pulsing {
    animation: tradetime-transition-pulse 3s ease-out 1;
    border-radius: 0.5rem;
}

/* Reduced-motion fallback: same visual SIGNAL (you can tell something
   just transitioned) without the expanding-ring animation. */
@media (prefers-reduced-motion: reduce) {
    .tradetime-pulsing {
        animation: none;
        outline: 2px solid rgba(59, 130, 246, 0.8);
        outline-offset: 2px;
    }
}

/* Scrollbar Styles */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Custom scrollbar for modals (scrollbar-visible) */
.scrollbar-visible::-webkit-scrollbar {
    width: 8px;
}

.scrollbar-visible::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
    border-radius: 4px;
}

.dark .scrollbar-visible::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

.scrollbar-visible::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark .scrollbar-visible::-webkit-scrollbar-thumb {
    background: #475569;
}

.scrollbar-visible::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark .scrollbar-visible::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Dark Mode Styles */
.dark {
    background-color: #0f172a;
    color: #e2e8f0;
}

.dark .bg-white {
    background-color: #1e293b !important;
}

.dark .bg-slate-50 {
    background-color: #0f172a !important;
}

.dark .bg-slate-100 {
    background-color: #1e293b !important;
}

.dark .text-slate-900 {
    color: #e2e8f0 !important;
}

.dark .text-slate-800 {
    color: #cbd5e1 !important;
}

.dark .text-slate-700 {
    color: #94a3b8 !important;
}

.dark .text-slate-600 {
    color: #64748b !important;
}

.dark .text-slate-500 {
    color: #475569 !important;
}

.dark .border-slate-200 {
    border-color: #334155 !important;
}

.dark .border-slate-300 {
    border-color: #475569 !important;
}

/* v4.24.1 — Killzone band hover tooltip (CSS-only, no JS) */
.killzone-band-wrapper {
    position: relative;
}
.killzone-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: rgba(15, 23, 42, 0.95);
    color: #f1f5f9;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.killzone-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
}
.killzone-band-wrapper:hover .killzone-tooltip,
.killzone-band-wrapper:focus-within .killzone-tooltip {
    opacity: 1;
    visibility: visible;
}
@media (prefers-reduced-motion: reduce) {
    .killzone-tooltip {
        transition: none;
    }
}

/* v4.30.0 — rendered markdown (About / Help / Privacy). Tailwind's preflight
   strips list markers and heading sizes, so the build-time HTML from
   scripts/build-content.mjs needs explicit styling here. */
.md-content h2 { font-size: 1.125rem; font-weight: 600; margin: 1.1rem 0 0.4rem; }
.md-content h3 { font-size: 1rem; font-weight: 600; margin: 0.9rem 0 0.3rem; }
.md-content h4 { font-size: 0.95rem; font-weight: 600; margin: 0.8rem 0 0.25rem; }
.md-content h2:first-child,
.md-content h3:first-child { margin-top: 0; }
.md-content p { margin: 0 0 0.7rem; }
.md-content ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 0.7rem; }
.md-content li { margin: 0 0 0.25rem; }
.md-content a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.md-content strong { font-weight: 600; }
.md-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    font-size: 0.85em;
    background: rgba(100, 116, 139, 0.16);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}
.md-content blockquote {
    border-left: 3px solid rgba(100, 116, 139, 0.4);
    padding-left: 0.85rem;
    margin: 0 0 0.7rem;
    color: inherit;
    opacity: 0.9;
}
.md-content hr { border: 0; border-top: 1px solid rgba(100, 116, 139, 0.3); margin: 1rem 0; }
.dark .md-content a { color: #60a5fa; }

/* Quick tour (v4.32.0) — voluntary, on-demand coachmarks (QuickTour.js).
   The highlight ring marks the element the current step points at; the card
   itself is positioned + styled inline by the component. */
.tour-target-highlight {
    outline: 3px solid #3b82f6;
    outline-offset: 3px;
    border-radius: 8px;
    transition: outline-color 0.2s ease;
}
@keyframes tourCardIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tour-card-enter { animation: tourCardIn 0.18s ease-out; }
@media (prefers-reduced-motion: reduce) { .tour-card-enter { animation: none; } }
