/* IA Writer inspired dark theme with monospace font */

/* Font face declarations - IA Writer Duospace */
@font-face {
    font-family: 'IA Writer Duospace';
    src: url('fonts/iAWriterDuospace-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IA Writer Duospace';
    src: url('fonts/iAWriterDuospace-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IA Writer Duospace';
    src: url('fonts/iAWriterDuospace-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'IA Writer Duospace';
    src: url('fonts/iAWriterDuospace-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --text-primary: #d4d4d4;
    --text-secondary: #9ca3af;
    --accent: #6b7280;
    --grid-line: #2d2d2d;
    --chart-line-width: 2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IA Writer Duospace', 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 0;
    margin: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.chart-container {
    background-color: var(--bg-primary);
    padding: 40px 30px 25px;
    border: none;
    position: relative;
    display: flex;
    gap: 20px;
    height: 50vh;
    max-height: 50vh;
    overflow: hidden;
    box-sizing: border-box;
}

.chart-wrapper {
    flex: 1;
    position: relative;
}

.data-labels {
    width: 80px;
    flex-shrink: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    position: absolute;
    right: 10px; /* Move closer to chart */
    top: 0;
}

.data-labels.hidden {
    opacity: 0;
}

.data-label {
    position: absolute;
    font-size: 11px;
    font-weight: 400;
    text-align: right;
    font-family: 'IA Writer Duospace', monospace;
    white-space: nowrap;
    transform: translateY(-50%);
    line-height: 1;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
}

.chart-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: capitalize;
    letter-spacing: 0;
}

.time-controls {
    display: flex;
    gap: 4px;
}

.time-btn {
    background-color: transparent;
    border: none;
    color: #4a4a4a;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
    transition: color 0.15s;
    text-transform: lowercase;
    letter-spacing: 0;
}

.time-btn:hover {
    color: #6b7280;
}

.time-btn.active {
    color: #6b7280;
}

.chart-svg {
    width: calc(100% - 110px);
    height: calc(50vh - 80px);
    max-height: calc(50vh - 80px);
    min-height: 200px; /* Ensure minimum height */
    display: block;
    overflow: visible;
}

.chart-svg text {
    font-family: 'IA Writer Duospace', 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace;
    fill: #6b7280;
    font-size: 10px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .chart-container {
        height: 25vh;
        max-height: 25vh;
    }
    
    .chart-svg {
        height: calc(25vh - 80px);
        max-height: calc(25vh - 80px);
    }
}

@media (max-width: 768px) {
    .chart-container {
        padding: 30px 20px 15px;
    }
    
    .chart-svg {
        height: calc(25vh - 60px);
        max-height: calc(25vh - 60px);
    }
}

/* Loading state */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

