stocks / static /css /replay.css
Arrechenash's picture
Initial Commit
3aed849
Raw
History Blame Contribute Delete
8.04 kB
/* =======================================
Replay Page - Unified with common.css
ONLY unique layout overrides. ALL variables from common.css
======================================= */
/* Make the replay page use full viewport height with flex layout.
Nav + control-panel take auto height, replay-layout fills the rest. */
body.replay-page {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
body.replay-page .page-wrapper {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
padding-bottom: 0;
width: 100%;
max-width: none;
margin: 0;
align-self: stretch;
}
/* Full-height grid layout - unique to replay */
.replay-layout {
display: grid;
grid-template-columns: 1fr 340px;
grid-template-rows: 1fr;
flex: 1;
min-height: 0;
}
/* Main chart area */
.replay-main {
grid-column: 1 / 2;
grid-row: 1 / 2;
position: relative;
min-height: 0;
overflow: hidden;
border-right: 1px solid var(--border);
}
#chart-container {
width: 100%;
height: 100%;
min-height: 0;
}
/* Sidebar */
.replay-sidebar {
grid-column: 2 / 3;
grid-row: 1 / 2;
background: var(--bg-elevated);
display: flex;
flex-direction: column;
border-bottom: 1px solid var(--border);
overflow-y: auto;
}
/* Collapsible: chart reclaims the full window width */
.replay-layout.sidebar-collapsed {
grid-template-columns: 1fr 0;
}
.replay-layout.sidebar-collapsed .replay-sidebar {
display: none;
}
/* Floating toggle button over the chart (top-right) */
.sidebar-toggle {
position: absolute;
top: var(--space-sm);
right: var(--space-sm);
z-index: 5;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
font-size: 18px;
line-height: 1;
color: var(--text-muted);
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-md);
cursor: pointer;
transition:
color 0.15s,
background 0.15s;
}
.sidebar-toggle:hover {
color: var(--text);
background: var(--bg);
}
/* History section — flex child inside .replay-sidebar, takes remaining space */
.replay-history {
flex: 1;
min-height: 0;
overflow-y: auto;
background: var(--bg);
font-size: var(--font-xs);
border-top: 1px solid var(--border);
}
/* ════════════════════════════════
Responsive — Replay Page
════════════════════════════════ */
@media (max-width: 1024px) {
.replay-layout {
grid-template-columns: 1fr 280px;
}
}
@media (max-width: 768px) {
.replay-layout {
grid-template-columns: 1fr;
grid-template-rows: 1fr auto;
}
.replay-main {
grid-column: 1;
grid-row: 1;
border-right: none;
min-height: 50vh;
}
#chart-container {
max-height: none;
height: 100%;
}
.replay-sidebar {
grid-column: 1;
grid-row: 2;
max-height: 50vh;
border-bottom: none;
border-top: 1px solid var(--border);
}
.replay-history table {
font-size: var(--font-xs);
}
.replay-history th,
.replay-history td {
padding: 6px var(--space-sm);
}
/* Compact controls on mobile */
#playback-controls {
flex-wrap: wrap;
gap: 6px;
}
#progress-slider {
min-width: 100px;
}
.control-panel__main {
flex-wrap: wrap;
}
}
/* Sidebar sections - reuse common.css patterns */
.sidebar-section {
padding: var(--space-md);
border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child {
border-bottom: none;
}
/* Section titles */
.sidebar-section .section-title {
font-size: var(--font-xs);
color: var(--text-muted);
text-transform: uppercase;
margin-bottom: var(--space-md);
letter-spacing: 0.05em;
}
/* Order tabs - use common.css .view-toggle pattern */
.order-tabs {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1px;
background: var(--border);
border: 1px solid var(--border);
border-radius: var(--radius-md);
overflow: hidden;
margin-bottom: var(--space-md);
}
.tab-btn {
background: var(--bg-elevated);
border: none;
padding: var(--space-sm);
color: var(--text-muted);
cursor: pointer;
font-size: var(--font-xs);
font-weight: 600;
text-transform: uppercase;
transition: all var(--transition-fast);
}
.tab-btn:hover {
color: var(--text);
}
.tab-btn.active {
background: var(--accent);
color: var(--bg);
font-weight: bold;
}
/* Form elements - reuse common.css */
.form-group {
margin-bottom: var(--space-md);
}
.form-group label {
display: block;
font-size: var(--font-xs);
color: var(--text-muted);
margin-bottom: var(--space-xs);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.form-group input {
width: 100%;
background: var(--bg-input);
border: 1px solid var(--border);
color: var(--text);
padding: var(--space-sm);
border-radius: var(--radius-md);
font-family: var(--font-mono);
font-size: var(--font-sm);
}
.form-group input:focus {
outline: 2px solid var(--accent);
outline-offset: 2px;
border-color: var(--accent);
}
/* Trade actions */
.trade-actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-sm);
}
/* Replay-specific button variants */
.btn-buy {
background: var(--success);
color: var(--on-success);
font-weight: bold;
}
.btn-sell {
background: var(--danger);
color: var(--on-danger);
font-weight: bold;
}
.btn-flatten {
background: var(--bg-input);
color: var(--text);
margin-top: var(--space-sm);
width: 100%;
}
/* Stats grid */
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-sm);
}
.stat-card {
background: var(--bg);
padding: var(--space-sm);
border-radius: var(--radius-md);
border: 1px solid var(--border);
}
.stat-card .section-title {
margin: 0;
font-size: var(--font-xs);
}
.stat-val {
font-size: var(--font-lg);
font-weight: bold;
margin-top: var(--space-xs);
color: var(--text);
}
.val-long {
color: var(--success);
}
.val-short {
color: var(--danger);
}
/* History table - unified with Scanner tables */
.replay-history table {
width: 100%;
border-collapse: collapse;
font-size: var(--font-sm);
}
.replay-history th {
background: var(--bg);
text-align: left;
padding: 12px;
color: var(--text-muted);
font-weight: 600;
text-transform: uppercase;
font-size: var(--font-xs);
letter-spacing: 0.05em;
border-bottom: 1px solid var(--border);
}
.replay-history td {
padding: 10px 12px;
border-bottom: 1px solid var(--border);
color: var(--text);
}
.replay-history tr:hover {
background: var(--overlay-1);
}
.replay-history .positive {
color: var(--positive);
}
.replay-history .negative {
color: var(--negative);
}
/* Playback controls */
#playback-controls {
display: flex;
align-items: center;
gap: 12px;
background: var(--bg-elevated);
padding: var(--space-xs) var(--space-sm);
border-radius: var(--radius-lg);
flex: 1;
}
/* !important needed: JS may set inline style on #playback-controls */
#playback-controls.hidden {
display: none !important;
}
#playback-controls .btn {
padding: var(--space-xs) var(--space-sm);
background: transparent;
border: none;
color: var(--text);
}
#playback-controls .btn:hover {
color: var(--accent);
}
#playback-controls .btn.active {
background: var(--accent);
color: var(--bg);
}
#progress-slider {
flex: 1;
accent-color: var(--accent);
}
#progress-label {
font-family: var(--font-mono);
font-size: var(--font-xs);
color: var(--text-muted);
}
/* Market info */
#display-market-info {
font-family: var(--font-mono);
font-size: var(--font-sm);
line-height: 1.6;
}
/* History section title */
.replay-history .section-title:first-child {
padding: var(--space-sm) var(--space-sm) 0;
}
/* Replay-specific input styles */
.replay-symbol-input {
width: 70px;
font-weight: bold;
text-transform: uppercase;
}
.replay-tf-select {
width: 60px;
}
.replay-loading-overlay {
display: none;
position: absolute;
inset: 0;
align-items: center;
justify-content: center;
background: rgba(19, 23, 34, 0.85);
z-index: 10;
font-size: 1rem;
color: var(--text-muted);
}