﻿.mh-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: none;
}

.mh-label-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    width: 80px;
    flex-shrink: 0;
}

.archetype-header-stats {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.archetype-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.archetype-stat-item--level {
    grid-column: 1 / -1;
}

.mh-label {
    font-size: 0.72rem;
    color: var(--muted);
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.mh-label.mh-label--bold {
    font-weight: 700;
    color: var(--text);
}

.mh-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid var(--muted);
    font-size: 0.55rem;
    color: var(--muted);
    cursor: default;
    flex-shrink: 0;
    line-height: 1;
    font-family: var(--mono);
    user-select: none;
}

.mh-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.68rem;
    font-family: var(--sans, sans-serif);
    line-height: 1.45;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    width: 200px;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.mh-label-wrap:hover .mh-tooltip {
    display: block;
}

.mh-bar-track {
    flex: 1;
    height: 5px;
    background: var(--bg3);
    border-radius: 3px;
    overflow: hidden;
    min-width: 0;
}

.mh-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent-muted, var(--accent));
    transition: width 0.4s ease;
}

.mh-bar-fill--accent {
    background: var(--accent);
}

.mh-value {
    font-size: 0.78rem;
    font-family: var(--mono);
    font-weight: 600;
    color: var(--text);
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

.mh-hint {
    display: none;
    font-size: 0.62rem;
    color: var(--muted);
    font-family: var(--mono);
    padding-left: 2px;
    margin-top: 0.1rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .mh-info-icon { display: none; }
    .mh-hint { display: block; }
    .mh-bar-track { height: 6px; }
}

.results-search-wrap {
    position: relative;
    flex-shrink: 0;
}

.results-search-wrap .results-search-icon {
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.7rem;
    pointer-events: none;
}

.results-search-input {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem 0.3rem 1.75rem;
    outline: none;
    width: 180px;
    transition: border-color 0.2s, width 0.2s;
}

.results-search-input:focus {
    border-color: var(--accent);
    width: 220px;
}

.results-search-input::placeholder {
    color: var(--muted);
}

.results-no-match {
    display: none;
    padding: 1.25rem 1rem;
    font-size: 0.78rem;
    color: var(--muted);
    font-family: var(--mono);
    text-align: center;
}

.tournament-share-btn {
    margin-top: auto;
    align-self: flex-end;
}

.deck-edit-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 3px;
    text-decoration: none;
    background: rgba(61, 208, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(61, 208, 255, 0.35);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    cursor: pointer;
    white-space: nowrap;
}

.deck-edit-btn:hover {
    background: rgba(61, 208, 255, 0.18);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.deck-edit-btn:active {
    background: rgba(61, 208, 255, 0.28);
    transform: translateY(0);
}

/* ── Insights achievement cards ─────────────────────────────────────────── */

.fp-insights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.fp-insight {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 1.25rem 1rem 1rem;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fp-insight:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ── Per-category: full border + distinct tinted background ── */

.fp-insight--uniqueness   { border-color: #3dd0ff; background: rgba(61,  208, 255, 0.07); }
.fp-insight--similarity   { border-color: #a78bfa; background: rgba(167, 139, 250, 0.07); }
.fp-insight--structure    { border-color: #60a5fa; background: rgba(96,  165, 250, 0.07); }
.fp-insight--colour       { border-color: #34d399; background: rgba(52,  211, 153, 0.07); }
.fp-insight--traits       { border-color: #fb923c; background: rgba(251, 146,  60, 0.07); }
.fp-insight--card-choice  { border-color: #fbbf24; background: rgba(251, 191,  36, 0.07); }
.fp-insight--contribution { border-color: #4ade80; background: rgba(74,  222, 128, 0.07); }

/* ── Icon: big, centred, above text ── */

.fp-insight__icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.85rem;
}

.fp-insight--uniqueness   .fp-insight__icon { background: rgba(61,  208, 255, 0.15); color: #3dd0ff; }
.fp-insight--similarity   .fp-insight__icon { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.fp-insight--structure    .fp-insight__icon { background: rgba(96,  165, 250, 0.15); color: #60a5fa; }
.fp-insight--colour       .fp-insight__icon { background: rgba(52,  211, 153, 0.15); color: #34d399; }
.fp-insight--traits       .fp-insight__icon { background: rgba(251, 146,  60, 0.15); color: #fb923c; }
.fp-insight--card-choice  .fp-insight__icon { background: rgba(251, 191,  36, 0.15); color: #fbbf24; }
.fp-insight--contribution .fp-insight__icon { background: rgba(74,  222, 128, 0.15); color: #4ade80; }

/* ── Body: stacked text, centred ── */

.fp-insight__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
}

.fp-insight__cat {
    font-size: 0.58rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 1px 6px;
    margin-bottom: 0.2rem;
}

.fp-insight__title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.fp-insight__desc {
    font-size: 0.71rem;
    color: var(--muted);
    line-height: 1.5;
    font-family: var(--sans, sans-serif);
    margin-top: 0.15rem;
}

@media (max-width: 600px) {
    .fp-insights {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .fp-insights {
        grid-template-columns: 1fr;
    }
}