/* --- Rathi ALGO Quantitative Terminal Themes --- */

@layer base {
    body {
        @apply bg-[#05070a] text-slate-100 font-sans antialiased overflow-hidden select-none;
    }
}

/* Custom Webkit Scrollbars for Terminal Glow */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #05070a;
}

::-webkit-scrollbar-thumb {
    background: #182232;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2b3a4f;
    border-color: #00f0ff;
}

/* Skeleton Loading Shimmer Animation */
.shimmer {
    background: linear-gradient(90deg, #0e1622 25%, #18253a 50%, #0e1622 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite linear;
}

@keyframes loading-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Heartbeat/Blinking Indicator Animations */
.blinking-green {
    animation: pulse-green 2s infinite ease-in-out;
}

.blinking-red {
    animation: pulse-red 2.5s infinite ease-in-out;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 2px #00ff88); }
    50% { opacity: 0.4; filter: drop-shadow(0 0 0px #00ff88); }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 2px #ff3366); }
    50% { opacity: 0.3; filter: drop-shadow(0 0 0px #ff3366); }
}

/* Glassmorphism & Custom borders */
.terminal-card {
    background: rgba(10, 14, 23, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid #182232;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.terminal-card:hover {
    border-color: rgba(0, 240, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 240, 255, 0.03);
}

.terminal-input {
    background: #080c14;
    border: 1px solid #182232;
    color: #f3f4f6;
    outline: none;
    transition: all 0.2s ease;
}

.terminal-input:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

.glow-btn-cyan {
    background: #00f0ff;
    color: #000;
    font-weight: 600;
    transition: all 0.2s ease;
}

.glow-btn-cyan:hover:not(:disabled) {
    background: #00d2e0;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.glow-btn-cyan:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* F&O Trade of the Day Glow Overlay */
.setup-highlight-card {
    border: 1px solid rgba(255, 159, 67, 0.35);
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.05) 0%, rgba(10, 14, 23, 0.75) 100%);
    box-shadow: 0 8px 32px 0 rgba(255, 159, 67, 0.04);
}

/* Table overrides for terminal look */
.terminal-table {
    @apply w-full border-collapse text-left text-xs;
}

.terminal-table th {
    @apply px-4 py-3 text-slate-400 font-semibold border-b border-[#182232] uppercase tracking-wider text-[10px];
}

.terminal-table td {
    @apply px-4 py-3 border-b border-[#0f1624] text-slate-200 font-medium;
}

.terminal-table tbody tr {
    @apply transition-colors duration-150;
}

.terminal-table tbody tr:hover {
    @apply bg-[rgba(24,34,50,0.2)];
}

/* Search Dropdown absolute containers */
.ticker-autocomplete-list {
    background: #0e1422;
    border: 1px solid #222b3d;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
}

.ticker-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ticker-autocomplete-item:hover {
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
}

/* Fullscreen Chart Overlay */
#analysis-chart-panel.fullscreen-chart {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

#analysis-chart-panel.fullscreen-chart #chart-price-pane {
    height: calc(100vh - 170px) !important;
}
