/* Smelters page styles — promoted from an inline <style> block in smelters.html
   so card/button patterns can evolve with the rest of the design system. */

.attention-banner {
    background: var(--red);
    color: white;
    padding: 14px 20px;
    margin: 12px 20px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    display: none;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.35);
}
.attention-banner.show { display: block; }
.attention-banner ul { margin: 6px 0 0 20px; font-weight: 400; }

.smelter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    padding: 0 20px 20px;
}

/* Smelter card reuses the .surface language with a page-specific padding. */
.smelter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
@media (hover: hover) {
    .smelter-card:hover {
        border-color: var(--border-light);
        box-shadow: var(--shadow);
        transform: translateY(-2px);
    }
}
.smelter-card.needs-attention {
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red), var(--shadow-sm);
}

.sc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.sc-zone { font-size: 11px; color: var(--text-muted); padding: 2px 6px; background: var(--bg-input); border-radius: var(--radius-sm); }

.sc-status {
    font-size: 11px; padding: 3px 8px; border-radius: var(--radius-full);
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.sc-status.active { background: var(--green-dim); color: var(--green); }
.sc-status.needs_fuel { background: var(--red-dim); color: var(--red); }
.sc-status.paused { background: var(--yellow-dim); color: var(--yellow); }
.sc-status.ruined_unconfirmed { background: var(--red-dim); color: var(--red); animation: pulse 1.5s infinite; }
.sc-status.completed { background: var(--blue-dim); color: var(--blue); }
.sc-status.ruined, .sc-status.abandoned, .sc-status.harvested { background: var(--bg-tertiary); color: var(--text-muted); }

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

.sc-timers { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; }
.sc-timer-label { color: var(--text-muted); }
.sc-timer-val { font-variant-numeric: tabular-nums; color: var(--text-secondary-strong); }
.sc-timer-val.warn { color: var(--yellow); }
.sc-timer-val.crit { color: var(--red); font-weight: 600; }

.sc-reading {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding: 4px 8px; background: var(--bg-input); border-radius: var(--radius-sm);
    font-size: 11px; margin: 4px 0;
}
.sc-reading-none { color: var(--text-muted); font-style: italic; }
.sc-lit { font-weight: 600; }
.sc-fuel { color: var(--yellow); }
.sc-slot { color: var(--text-muted); }
.sc-reading-age { color: var(--text-muted); font-size: 10px; margin-left: auto; }

.sc-ore-badge {
    background: var(--green-dim); color: var(--green); font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-full); text-transform: uppercase;
}
.sc-wm-badge {
    background: var(--purple-dim); color: var(--purple); font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-full);
    border: 1px solid rgba(167, 139, 250, 0.3);
}
.sc-slag-warn {
    background: rgba(245, 158, 11, 0.15); color: var(--yellow); font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-full);
}
.sc-harvest-badge {
    background: var(--blue-dim); color: var(--blue); font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-full); text-transform: uppercase;
}
.sc-cycle-badge {
    background: var(--purple-dim); color: var(--purple); font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-full); text-transform: uppercase;
    border: 1px solid rgba(167, 139, 250, 0.3); margin-left: 6px;
}
.sc-paused-banner {
    font-size: 11px; padding: 6px 10px; border-radius: var(--radius-sm);
    margin: 4px 0; display: flex; align-items: center; gap: 6px;
}
.sc-paused-stockout {
    background: rgba(245, 158, 11, 0.08); color: var(--yellow); border: 1px solid rgba(245, 158, 11, 0.25);
}
.sc-paused-structural {
    background: var(--red-dim); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.25);
}
.sc-paused-reason-small { color: var(--text-muted); font-size: 10px; margin-left: auto; }

.sc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sc-actions button {
    padding: 5px 10px; font-size: 11px; border-radius: var(--radius-sm); cursor: pointer;
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}
.sc-actions button:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.sc-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.sc-actions button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.sc-actions button.danger { background: var(--red); border-color: var(--red); color: #fff; }

.sc-mode {
    display: flex; align-items: center; gap: 6px; font-size: 11px;
    color: var(--text-muted); margin-top: 4px;
}
.sc-mode select {
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 2px 4px; font-size: 11px;
}

.history-table {
    width: calc(100% - 40px); margin: 0 20px 20px;
    border-collapse: collapse; font-size: 12px;
}
.history-table th,
.history-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.history-table th { color: var(--text-muted); font-weight: 500; font-size: 11px; text-transform: uppercase; }
