/*
 * material.css — Mineral catalog page. Same shape as inventory.css (single
 * ui-panel: stats + filter + grid) plus a slightly bigger modal (set-bonus
 * block) since materials carry more info than plain inventory items.
 */

.mat-main {
    position: relative; z-index: 2; flex: 1;
    display: flex; padding: 16px 20px; min-height: 0; overflow: hidden;
}
.mat-panel {
    flex: 1; display: flex; flex-direction: column; gap: 12px;
    padding: 16px 18px;
}

.mat-stats { display: flex; }
.mat-stat { flex: 1; text-align: center; padding: 4px 6px; border-right: 1px solid rgba(58,36,16,.15); }
.mat-stat:last-child { border-right: none; }
.mat-stat-val { font-size: 18px; font-weight: 800; color: #2c1a08; font-family: var(--font-mono); }
.mat-stat-lbl { font-size: 10.5px; color: #8a6a48; letter-spacing: 1.5px; margin-top: 2px; }

.mat-filter-row { display: flex; gap: 8px; }
.mat-select { flex: 0 0 140px; cursor: pointer; }

.mat-grid {
    flex: 1;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.mat-card-name { font-size: 12.5px; font-weight: 700; color: #2c1a08; line-height: 1.3; }
.mat-card-set  { font-size: 9px; color: #8a6a48; }
.mat-card-qty  { font-size: 15px; font-weight: 800; font-family: var(--font-mono); }
.mat-tag {
    font-size: 9px; padding: 2px 8px; border-radius: 999px;
    border: 1px solid rgba(58,36,16,.25); color: #6b4520;
}

.mat-modal-head { display: flex; gap: 12px; align-items: center; }
.mat-modal-name { font-size: 15px; font-weight: 800; color: #2c1a08; margin-top: 4px; }
.mat-modal-sub  { font-size: 11.5px; color: #8a6a48; margin-top: 2px; }
.mat-modal-desc { font-size: 12.5px; color: #6b4520; line-height: 1.6; }
.mat-modal-kv { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.mat-kv-row {
    display: flex; justify-content: space-between; font-size: 12.5px;
    padding: 6px 0; border-bottom: 1px solid rgba(58,36,16,.1);
    color: #6b4520;
}
.mat-kv-row span:last-child { color: #2c1a08; font-weight: 700; }

@container (max-width: 720px) {
    .mat-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .mat-select { flex: 1 1 auto; }
    .mat-filter-row { flex-wrap: wrap; }
}
