/* Mining time calculator - builds on text-generators.css (.tg-* layout, panels). */
.mn-count {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.tg-panel .mn-search {
    margin-bottom: 8px;
}

.mn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 6px;
    max-height: 320px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--tg-line);
    border-radius: 12px;
    background: var(--tg-field);
}

.mn-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.66rem;
    line-height: 1.2;
    cursor: pointer;
}

.mn-block img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

.mn-block span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.mn-block:hover,
.mn-block.active {
    border-color: var(--tg-accent);
    background: var(--tg-accent-soft);
    color: var(--text-primary);
}

.mn-tabs {
    margin-bottom: 8px;
}

.main .mn-group {
    grid-column: 1 / -1;
    margin: 8px 0 2px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--tg-line);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
}

.mn-group small {
    color: var(--text-muted);
    font-weight: 500;
}

.mn-group:first-child {
    margin-top: 0;
}

.mn-more {
    grid-column: 1 / -1;
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.mn-toggle {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.mn-toggle button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--tg-line);
    border-radius: 999px;
    background: var(--tg-field);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.mn-toggle button img {
    image-rendering: pixelated;
}

.mn-toggle button.active {
    border-color: var(--tg-accent);
    background: var(--tg-accent-soft);
    color: var(--text-primary);
}

.mn-ranges {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.mn-ranges input[type="range"] {
    width: 100%;
    accent-color: var(--tg-accent);
    margin-bottom: 6px;
}

.mn-ranges label span {
    color: var(--tg-accent);
    font-weight: 600;
}

.mn-head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.mn-head img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
}

.mn-head div {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.mn-head small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.mn-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    text-align: center;
}

.mn-time {
    color: #80ff20;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    line-height: 1.1;
}

.mn-time.is-instant {
    color: #55ffff;
}

.mn-time.is-unbreakable {
    color: #ff6b6b;
}

.mn-drops {
    padding: 3px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, #80ff20 15%, transparent);
    color: #80ff20;
    font-size: 0.8rem;
    font-weight: 600;
}

.mn-drops.is-bad {
    background: color-mix(in srgb, #ff6b6b 15%, transparent);
    color: #ff8080;
}

.mn-drops[hidden] {
    display: none;
}

.mn-table-wrap {
    overflow-x: auto;
}

.mn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.mn-table th,
.mn-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--tg-line);
}

.main .mn-table td:first-child {
    text-align: left;
}

.mn-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.mn-table img {
    vertical-align: middle;
    image-rendering: pixelated;
}

.mn-table .fa-check {
    color: #80ff20;
}

.mn-table .fa-xmark {
    color: #ff6b6b;
}

.mn-table tr.is-current td {
    background: var(--tg-accent-soft);
    color: var(--text-primary);
    font-weight: 600;
}

.mn-rules {
    display: grid;
    gap: 8px;
    max-width: 820px;
    margin: 0 auto 10px;
    padding: 0;
    list-style: none;
}

.main .mn-rules li {
    padding: 8px 12px;
    border: 1px solid var(--tg-line);
    border-radius: 10px;
    background: var(--tg-field);
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: left;
}
