/* ─── Sistema de Insígnias (Badges) ─────────────────────────────────────────
   Arquivo: assets/css/badges.css
   Incluído em: feed.php, community_profile.php e demais páginas com badges
──────────────────────────────────────────────────────────────────────────── */

/* Wrapper inline ao lado do nome */
.user-badges-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
    line-height: 1;
}

/* Base de qualquer insígnia */
.az-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    line-height: 1;
    margin-left: 2px;
    position: relative;
    cursor: default;
    user-select: none;
    text-decoration: none !important;
}

/* ── Verificação (checkmark SVG) ── */
.az-badge-verified {
    width: 17px;
    height: 17px;
}

.az-badge-verified svg {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Emoji ── */
.az-badge-emoji {
    font-size: 13px;
    line-height: 1;
}

/* ── Imagem ── */
.az-badge-image {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
}

.az-badge-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Raridade: brilho ── */
.az-badge-rarity-legendary {
    filter: drop-shadow(0 0 4px currentColor);
}

.az-badge-rarity-epic {
    filter: drop-shadow(0 0 2px currentColor);
}

/* ── Tooltip ── */
.az-badge::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 200;
}

.az-badge:hover::after {
    opacity: 1;
}

/* Seta do tooltip */
.az-badge::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.82);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 200;
}

.az-badge:hover::before {
    opacity: 1;
}

/* ─── Badge Picker (edit_profile.php) ───────────────────────────────────── */

.ep-badge-auto-note {
    font-size: 12px;
    color: #aab;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ep-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.ep-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, transform 0.12s;
    position: relative;
    min-width: 70px;
    max-width: 90px;
    text-align: center;
}

.ep-badge-item:hover {
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
}

.ep-badge-item.selected {
    border-color: #7c4dff;
    background: rgba(124,77,255,0.15);
}

.ep-badge-item.selected .ep-badge-slot-indicator {
    color: #7c4dff;
    font-size: 10px;
    font-weight: 700;
}

.ep-badge-icon {
    font-size: 20px;
    line-height: 1;
}

.ep-badge-icon .az-badge {
    margin: 0;
    font-size: 20px;
}

.ep-badge-icon .az-badge-emoji { font-size: 20px; }
.ep-badge-icon .az-badge-verified { width: 24px; height: 24px; }
.ep-badge-icon .az-badge-image { width: 28px; height: 28px; }

.ep-badge-label {
    font-size: 11px;
    color: #ccd;
    font-weight: 600;
    line-height: 1.2;
}

.ep-badge-desc {
    font-size: 10px;
    color: #778;
    line-height: 1.3;
}

.ep-badge-slot-indicator {
    font-size: 10px;
    color: #556;
    height: 12px;
}

/* Preview e ações */
.ep-badges-preview-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    font-size: 13px;
    color: #aab;
}

.ep-badges-preview-label {
    font-size: 12px;
    color: #778;
    white-space: nowrap;
}

#ep-badges-preview {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ep-badges-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
