/* Heritage Panel — gold/amber theme following UpgradePanel conventions */

.heritage-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    flex-shrink: 1;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", Poppins, sans-serif;
    color: #f8fafc;
    pointer-events: all;
    background-color: #121214;
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 18px 14px;
}

/* Ensure emoji characters render correctly inside this component */
.heritage-panel .ui-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", Poppins, sans-serif;
    font-size: 1em;
    line-height: 1em;
    overflow: visible;
    text-align: center;
}

.heritage-panel .upgrade-category-title {
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: 14px;
}

.heritage-panel .panel-title {
    margin-bottom: 8px;
}

.heritage-loading {
    color: #71717a;
    font-size: 14px;
    text-align: center;
    padding: 40px;
}

/* ── Status bar ─────────────────────────────────────────────── */
.heritage-stat-bar {
    display: flex;
    align-items: center;
    background-color: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 8px;
    flex-shrink: 0;
    justify-content: space-around;
}

.heritage-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 12px;
    align-items: center;
}

.heritage-stat-sep {
    width: 1px;
    height: 24px;
    background-color: rgba(63, 63, 70, 0.4);
    flex-shrink: 0;
}

.heritage-stat-label {
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 4px;

    .ui-icon {
        font-size: 14px;
        color: rgba(245, 158, 11, 0.7);
    }
}

.heritage-stat-value {
    font-size: 16px;
    font-weight: 900;
    color: #f8fafc;
}

.heritage-stat-sub {
    font-size: 10px;
    font-weight: 700;
    color: #a1a1aa;
    margin-left: 2px;
}

/* ── Level progress ─────────────────────────────────────────── */
.hp-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    background-color: #1a1400;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.hp-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(245, 158, 11, 0.12);
    border: 2px solid rgba(245, 158, 11, 0.35);
    border-radius: 12px;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    padding: 0;
    overflow: visible;
}

.hp-badge-num {
    font-size: 24px;
    font-weight: 900;
    color: #f59e0b;
    line-height: 24px;
    margin-bottom: -2px;
}

.hp-badge-label {
    font-size: 7px;
    font-weight: 800;
    color: #f59e0b;
    opacity: 0.9;
    letter-spacing: 1px;
    line-height: 7px;
}

.hp-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.hp-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hp-to-label {
    font-size: 11px;
    font-weight: 800;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hp-pct {
    font-size: 13px;
    font-weight: 900;
    color: #f59e0b;
}

.hp-bar {
    height: 10px;
    background-color: #27272a;
    border-radius: 5px;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    background-color: #f59e0b;
    border-radius: 5px;
}

.hp-sub {
    font-size: 11px;
    font-weight: 700;
    color: #a1a1aa;
}

/* ── Reset card ─────────────────────────────────────────────── */
.heritage-reset-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: #1a1400;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.heritage-reset-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.heritage-reset-nw {
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d8;

    b {
        color: #fff;
    }
}

.heritage-reset-earn {
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d8;

    b {
        color: #f59e0b;
    }

    &.clr-gold {
        color: #f59e0b;
        
        b {
            color: #fff;
        }
    }
}

.heritage-reset-btn {
    background-color: #f59e0b;
    color: #000;
    font-size: 13px;
    font-weight: 900;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 6px 0 #92400e;
    flex-shrink: 0;

    &.disabled {
        background-color: #3f3f46;
        color: #71717a;
        box-shadow: none;
        cursor: not-allowed;
        opacity: 0.5;

        &:hover {
            background-color: #3f3f46;
            box-shadow: none;
        }
    }

    &:hover {
        background-color: #fbbf24;
        box-shadow: 0 8px 0 #92400e;
    }

    &:active {
        box-shadow: 0 3px 0 #92400e;
    }

    &.disabled {
        background-color: #27272a;
        color: #52525b;
        box-shadow: none;
        cursor: not-allowed;
    }
}

.heritage-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #27272a;
    color: #f8fafc;
    font-size: 10px;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.05);

    &.h-cap {
        background-color: rgba(16, 185, 129, 0.15);
        color: #10b981;
        border-color: rgba(16, 185, 129, 0.4);
    }

    &.h-inf {
        background-color: rgba(59, 130, 246, 0.15);
        color: #60a5fa;
        border-color: rgba(59, 130, 246, 0.4);
    }

    &.h-trade {
        background-color: rgba(245, 158, 11, 0.15);
        color: #f59e0b;
        border-color: rgba(245, 158, 11, 0.4);
    }

    &.h-ops {
        background-color: rgba(139, 92, 246, 0.15);
        color: #a78bfa;
        border-color: rgba(139, 92, 246, 0.4);
    }
}

.upgrade-card.owned .heritage-badge {
    opacity: 1;
}

.upgrade-card.locked .heritage-badge {
    background-color: rgba(63, 63, 70, 0.5);
    color: #52525b;
    border-color: transparent;
}

/* ── Coin guide milestones list ──────────────────────────────── */
.hg-milestone-list {
    display: flex;
    flex-direction: column;
    background-color: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 2px 14px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.hg-mrow {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #27272a;
}

.hg-mrow-icon {
    font-size: 14px;
    width: 16px;
    flex-shrink: 0;
    color: #3f3f46;
}

.hg-mrow-label {
    font-size: 13px;
    font-weight: 600;
    color: #52525b;
    flex: 1;
}

.hg-mrow-coins {
    font-size: 12px;
    font-weight: 700;
    color: #3f3f46;
}

.hg-mrow-reached .hg-mrow-icon {
    color: #f59e0b;
}

.hg-mrow-reached .hg-mrow-label {
    color: #f8fafc;
}

.hg-mrow-reached .hg-mrow-coins {
    color: #f59e0b;
}

.heritage-guide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #27272a;
    padding: 10px 14px;
    margin-top: 0;
}

.hg-total-label {
    font-size: 12px;
    color: #71717a;
    font-weight: 500;
}

.hg-total-val {
    font-size: 13px;
    color: #f59e0b;
    font-weight: 800;
}

/* ── Confirm popup ──────────────────────────────────────────── */
.heritage-confirm {
    border-color: rgba(245, 158, 11, 0.4);
}

.heritage-yes {
    background-color: #f59e0b;
    color: #000;

    &:hover {
        background-color: #fbbf24;
    }
}
