/* Kalshi Weather Trading Dashboard Styles */

/* Smooth animations */
* {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Pulsing status indicator */
.status-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* City cards */
.city-card {
    background: linear-gradient(145deg, #1f2937, #111827);
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
}

.city-card.nyc { border-left: 4px solid #3b82f6; }
.city-card.chi { border-left: 4px solid #ef4444; }
.city-card.mia { border-left: 4px solid #f59e0b; }
.city-card.aus { border-left: 4px solid #10b981; }

/* Signal row highlighting */
.signal-row {
    transition: background-color 0.2s;
}

.signal-row:hover {
    background-color: #374151;
}

.signal-row.buy-yes {
    border-left: 3px solid #10b981;
}

.signal-row.buy-no {
    border-left: 3px solid #ef4444;
}

/* Position cards */
.position-card {
    padding: 12px 16px;
    transition: background-color 0.2s;
}

.position-card:hover {
    background-color: #1f2937;
}

.position-card.profit {
    border-left: 3px solid #10b981;
}

.position-card.loss {
    border-left: 3px solid #ef4444;
}

/* Button loading state */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

.toast.info {
    background: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge.green { background: #059669; }
.badge.red { background: #dc2626; }
.badge.yellow { background: #d97706; }
.badge.blue { background: #2563eb; }
.badge.gray { background: #4b5563; }

/* Chart container */
#pnl-chart {
    max-height: 250px;
}

/* Regime indicators */
.regime-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #374151;
}

.regime-tag.clear_stable, .regime-tag.CLEAR_STABLE { background: #059669; }
.regime-tag.lake_breeze_risk, .regime-tag.LAKE_BREEZE_RISK { background: #dc2626; }
.regime-tag.convective_risk, .regime-tag.CONVECTIVE_RISK { background: #d97706; }
.regime-tag.frontal, .regime-tag.FRONTAL { background: #7c3aed; }
.regime-tag.sea_breeze_risk, .regime-tag.SEA_BREEZE_RISK { background: #0891b2; }
.regime-tag.tropical, .regime-tag.TROPICAL { background: #be185d; }
.regime-tag.extreme_heat, .regime-tag.EXTREME_HEAT { background: #dc2626; }

/* City card link styling */
a.city-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.city-card:hover {
    border-color: #3b82f6;
}

/* Edge color coding */
.edge-high { color: #10b981; }
.edge-medium { color: #f59e0b; }
.edge-low { color: #6b7280; }

/* Confidence bars */
.confidence-bar {
    height: 4px;
    background: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.confidence-bar .fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.confidence-bar .fill.high { background: #10b981; }
.confidence-bar .fill.medium { background: #f59e0b; }
.confidence-bar .fill.low { background: #6b7280; }
