/* Widget Components Styling */

/* Base Widget Container */
.widget-container {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.widget-container:hover {
    border-color: rgba(155, 155, 122, 0.3);
    box-shadow: 0 8px 32px rgba(155, 155, 122, 0.1);
}

/* Widget Header */
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.widget-actions {
    display: flex;
    gap: 8px;
}

.widget-action-btn {
    padding: 4px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-action-btn:hover {
    background: rgba(155,155,122,0.1);
    border-color: rgba(155,155,122,0.3);
    color: var(--primary-gold);
}

/* Scanning Effect for Widgets */
.widget-scan::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
    animation: scan 3s linear infinite;
}

/* KPI Cards */
.kpi-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0;
}

.kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-change {
    font-size: 11px;
    color: var(--success-green);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-change.negative {
    color: var(--alert-red);
}

/* Team Cards */
.team-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.team-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(155,155,122,0.3);
    transform: translateX(4px);
}

.team-logo {
    width: 40px;
    height: 40px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.team-info {
    flex: 1;
}

.team-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.team-stats {
    display: flex;
    gap: 12px;
}

.team-stat {
    font-size: 11px;
    color: var(--text-secondary);
}

.team-stat-value {
    color: var(--primary-gold);
    font-weight: 600;
}

/* Stack Cards */
.stack-card {
    background: linear-gradient(135deg, rgba(155,155,122,0.05) 0%, rgba(155,155,122,0.02) 100%);
    border: 1px solid rgba(155,155,122,0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.stack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stack-game {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.stack-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-gold);
}

.stack-players {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.stack-player {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
}

/* Injury Cards */
.injury-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border-left: 3px solid var(--alert-red);
    border-radius: 4px;
    margin-bottom: 8px;
}

.injury-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.injury-status.questionable {
    background: var(--alert-yellow);
}

.injury-status.doubtful {
    background: var(--alert-red);
}

.injury-status.out {
    background: #666;
}

.injury-info {
    flex: 1;
}

.injury-player {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.injury-details {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 300px;
    position: relative;
    padding: 12px;
}

/* Loading States */
.widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(155,155,122,0.2);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alert Badges */
.alert-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.alert-badge.critical {
    background: rgba(255,68,68,0.2);
    color: var(--alert-red);
}

.alert-badge.warning {
    background: rgba(255,193,7,0.2);
    color: var(--alert-yellow);
}

.alert-badge.info {
    background: rgba(33,150,243,0.2);
    color: var(--alert-blue);
}
