/* ──────────────────────────────────────────────
   Mentions & Origines — Public menu styles
   Package: alacarte/mentions
   ────────────────────────────────────────────── */

/* ─── Badge pills ─────────────────────────── */
.mention-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    line-height: 1.4;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    position: relative;
    cursor: default;
    transition: background 0.15s;
}

.mention-badge:hover {
    background: #f1f5f9;
}

.mention-badge--sellable {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0e7490;
    cursor: pointer;
    text-decoration: none;
}

.mention-badge--sellable:hover {
    background: #cffafe;
    color: #0e7490;
    text-decoration: none;
}

.mention-badge__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.mention-badge__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* ─── Tooltip on badges ───────────────────── */
.mention-badge[data-mention-tooltip]:not([data-mention-tooltip=""]):hover::after {
    content: attr(data-mention-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 6px;
    background: #1e293b;
    color: white;
    font-size: 0.7rem;
    line-height: 1.3;
    white-space: normal;
    max-width: 220px;
    min-width: 100px;
    text-align: center;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.mention-badge[data-mention-tooltip]:not([data-mention-tooltip=""]):hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1e293b;
    z-index: 100;
    pointer-events: none;
}

/* Mobile: tap to show tooltip via focus */
@media (hover: none) {
    .mention-badge[data-mention-tooltip] {
        cursor: pointer;
    }

    .mention-badge[data-mention-tooltip]:focus::after {
        content: attr(data-mention-tooltip);
        position: absolute;
        bottom: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        padding: 6px 10px;
        border-radius: 6px;
        background: #1e293b;
        color: white;
        font-size: 0.7rem;
        line-height: 1.3;
        white-space: normal;
        max-width: 220px;
        min-width: 100px;
        text-align: center;
        z-index: 100;
    }

    .mention-badge[data-mention-tooltip]:focus::before {
        content: '';
        position: absolute;
        bottom: calc(100% + 2px);
        left: 50%;
        transform: translateX(-50%);
        border: 4px solid transparent;
        border-top-color: #1e293b;
        z-index: 100;
    }
}

/* ─── Inline mentions ─────────────────────── */
.mention-inlines {
    font-size: 0.85em;
    line-height: 1.4;
}

.mention-inline {
    color: #64748b;
}

.mention-inline__text {
    color: #475569;
}

.mention-inline__link {
    color: #2563eb;
    text-decoration: none;
}

.mention-inline__link:hover {
    text-decoration: underline;
}

.mention-inline__desc {
    font-style: italic;
}

/* ─── Footnotes ───────────────────────────── */
.mention-footnotes {
    border-top-color: rgba(0,0,0,0.08) !important;
}

.mention-footnote {
    line-height: 1.6;
}
