/**
 * accountant-persona-avatar.css
 * -----------------------------
 * Styles for the reusable accountant persona avatar component.
 * Used in: chat assistant messages, AI suggestions header, report narrative headings.
 *
 * Chunk 407: Created as shared stylesheet for persona avatar UI.
 *
 * Dependencies: design-tokens.css (CSS variables)
 */

/* --- Base wrapper: inline-flex for alignment with text --- */
.accountant-persona-avatar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    vertical-align: middle;
    line-height: 1;
}

/* --- Size variants --- */

/* Small: 24px circle */
.accountant-persona-avatar--sm .accountant-persona-avatar__image,
.accountant-persona-avatar--sm .accountant-persona-avatar__fallback {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
}
.accountant-persona-avatar--sm .accountant-persona-avatar__label {
    font-size: 0.8rem;
}

/* Medium (default): 32px circle */
.accountant-persona-avatar--md .accountant-persona-avatar__image,
.accountant-persona-avatar--md .accountant-persona-avatar__fallback {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}
.accountant-persona-avatar--md .accountant-persona-avatar__label {
    font-size: 0.875rem;
}

/* Large: 40px circle */
.accountant-persona-avatar--lg .accountant-persona-avatar__image,
.accountant-persona-avatar--lg .accountant-persona-avatar__fallback {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
}
.accountant-persona-avatar--lg .accountant-persona-avatar__label {
    font-size: 1rem;
}

/* --- Image avatar: circle crop with object-fit --- */
.accountant-persona-avatar__image {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--color-surface-alt, #e9ecef);
}

/* --- Initials fallback: circle with background --- */
.accountant-persona-avatar__fallback {
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary, #4a6fa5);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
    user-select: none;
}

/* --- Label text --- */
.accountant-persona-avatar__label {
    color: var(--color-text-secondary, #6c757d);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* --- Contextual alignment helpers --- */

/* Inside chat bubbles: compact left-align above message text */
.hf-chat-bubble .accountant-persona-avatar {
    margin-bottom: 0.25rem;
}

/* Inside narrative panels: subtle byline below heading */
.narrative-panel .accountant-persona-avatar {
    margin-bottom: 0.5rem;
}

/* Inside AI review header: inline beside title */
.ai-review-persona {
    margin-bottom: 0.75rem;
}
