/* Frequency Regulation Market Specific Styles */

/* Product color definitions */
:root {
    --primary-color: #FF6384;
    --secondary1-color: #36A2EB;
    --secondary2-color: #FFCE56;
    --tertiary1-color: #4BC0C0;
    --tertiary2-color: #9966FF;
}

/* Product Tabs */
.product-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    overflow-x: auto;
    flex-wrap: wrap;
}

.product-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card, #16213e);
    border: 1px solid var(--border, #2d3748);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    white-space: nowrap;
    color: var(--text-primary, #ffffff);
}

.product-tab:hover {
    border-color: var(--primary-light, #2e7d32);
    background: var(--bg-dark, #1a1a2e);
}

.product-tab.active {
    background: var(--primary, #1a5f2a);
    color: white;
    border-color: var(--primary, #1a5f2a);
}

.product-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.product-dot.primary { background: var(--primary-color); }
.product-dot.secondary1 { background: var(--secondary1-color); }
.product-dot.secondary2 { background: var(--secondary2-color); }
.product-dot.tertiary1 { background: var(--tertiary1-color); }
.product-dot.tertiary2 { background: var(--tertiary2-color); }

/* Product Summary Cards */
.product-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.product-card.primary::before { background: var(--primary-color); }
.product-card.secondary1::before { background: var(--secondary1-color); }
.product-card.secondary2::before { background: var(--secondary2-color); }
.product-card.tertiary1::before { background: var(--tertiary1-color); }
.product-card.tertiary2::before { background: var(--tertiary2-color); }

.product-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.product-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.product-badge.primary { background: var(--primary-color); }
.product-badge.secondary1 { background: var(--secondary1-color); }
.product-badge.secondary2 { background: var(--secondary2-color); }
.product-badge.tertiary1 { background: var(--tertiary1-color); }
.product-badge.tertiary2 { background: var(--tertiary2-color); }

.product-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.price-info {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-info .card-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.response-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Multi-product chart legend */
.chart-legend.multi-product {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.legend-color.primary { background: var(--primary-color); }
.legend-color.secondary1 { background: var(--secondary1-color); }
.legend-color.secondary2 { background: var(--secondary2-color); }
.legend-color.tertiary1 { background: var(--tertiary1-color); }
.legend-color.tertiary2 { background: var(--tertiary2-color); }

/* Simulator Section */
.simulator-card {
    background: var(--bg-card, #16213e);
}

.simulator-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.simulator-card h3 svg {
    width: 20px;
    height: 20px;
}

.simulator-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.input-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-unit input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border, #2d3748);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--bg-dark, #1a1a2e);
    color: var(--text-primary, #ffffff);
}

.input-with-unit .unit {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.simulator-results {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    min-height: 100px;
}

.result-placeholder {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.result-item {
    padding: 1rem;
    background: var(--bg-card, #16213e);
    border-radius: 8px;
    border-left: 4px solid var(--primary, #1a5f2a);
}

.result-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.result-item .value {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Market Status */
.market-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border, #2d3748);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    color: var(--text-secondary);
}

.status-value {
    font-weight: 500;
}

/* Product Table */
.product-table td:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suitability {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.suitability.high {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.suitability.medium {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.suitability.low {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

/* Notice Section */
.notice-section {
    margin-top: 1rem;
}

.notice-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.notice-icon {
    flex-shrink: 0;
}

.notice-icon svg {
    width: 24px;
    height: 24px;
    color: #eab308;
}

.notice-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
}

.notice-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .simulator-inputs {
        background: rgba(255, 255, 255, 0.05);
    }

    .simulator-results {
        background: rgba(255, 255, 255, 0.03);
    }

    .notice-card {
        background: rgba(234, 179, 8, 0.05);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .product-tabs {
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }

    .product-tab {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    .product-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .simulator-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .product-summary {
        grid-template-columns: 1fr;
    }
}
