/* ============================================
   Overview G8 Module - 8 TradingView Charts
   Pure Black Theme #000000
   ============================================ */

.overview-g8-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000000;
    overflow: hidden;
}

/* Header */
.overview-g8-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.overview-g8-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.overview-g8-title i {
    color: #F39C12;
    font-size: 16px;
}

.overview-g8-title h2 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.overview-g8-badge {
    padding: 3px 8px;
    background: rgba(243, 156, 18, 0.15);
    color: #F39C12;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
}

.overview-g8-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-g8-controls select {
    padding: 6px 24px 6px 10px;
    background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 4px center;
    background-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    outline: none;
    appearance: none;
}

.g8-btn {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #888;
    cursor: pointer;
    transition: all 0.15s;
}

.g8-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Grid Layout - 2 rows x 4 columns */
.overview-g8-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

/* Chart Container */
.g8-chart-container {
    background: #000000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.g8-chart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.g8-chart-flag {
    font-size: 14px;
}

.g8-chart-name {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.g8-chart {
    flex: 1;
    min-height: 0;
    background: #000000;
}

/* TradingView widget override */
.g8-chart iframe {
    border: none !important;
}

/* Fallback Chart */
.fallback-chart {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fallback-chart svg {
    flex: 1;
    width: 100%;
}

.fallback-price {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
}

.fallback-price.up { color: #22c55e; }
.fallback-price.down { color: #ef4444; }

.fallback-price .change {
    display: block;
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 1400px) {
    .overview-g8-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .overview-g8-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, 200px);
    }
}
