/* Haraka Pay user avatar and account card (wallet, merchant, PSP and admin headers). */
.pay-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
    color: #fff; font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: .02em;
    user-select: none; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .18);
}
.pay-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pay-avatar-lg { width: 46px; height: 46px; font-size: 16px; }

.pay-avatar-toggle {
    display: inline-flex; align-items: center; gap: .35rem; padding: 0; color: inherit;
}
.pay-avatar-toggle .fa { font-size: 14px; color: #6c757d; transition: transform .15s ease; }
.pay-avatar-toggle[aria-expanded="true"] .fa,
.show > .pay-avatar-toggle .fa { transform: rotate(180deg); }
.pay-avatar-toggle:hover .pay-avatar,
.pay-avatar-toggle:focus .pay-avatar { box-shadow: 0 0 0 2px var(--bs-primary, #3f78e0); }

/* account card at the top of the dropdown */
.pay-user-card { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem .5rem; min-width: 230px; }
.pay-user-info { min-width: 0; }
.pay-user-name { font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-user-sub { font-size: 12px; color: #6c757d; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-user-card + .dropdown-divider { margin: .25rem 0; }

/* the header's name-truncation rule must not clip the avatar ring */
header .navbar-nav .nav-item.dropdown > a.pay-avatar-toggle {
    display: inline-flex; max-width: none; overflow: visible; vertical-align: middle;
}
/* open menu sits a little below the avatar instead of on top of it */
.pay-avatar-toggle + .dropdown-menu,
.dropdown-toggle .pay-avatar ~ .dropdown-menu { margin-top: .6rem; }

/* the greeting beside the avatar: shown from tablet width up, avatar only on phones */
.pay-avatar-name {
    display: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 15px; font-weight: 700; color: var(--bs-primary, #3f78e0);
}
@media (min-width: 768px) { .pay-avatar-name { display: inline-block; } }

/* Logout in the account dropdown: highlighted in red, set apart by a divider */
.dropdown-menu .pay-logout-item {
    margin-top: .35rem; padding-top: .6rem; padding-bottom: .6rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
    color: #dc3545 !important; font-weight: 600; background: rgba(220, 53, 69, .05);
}
.dropdown-menu .pay-logout-item i { color: #dc3545 !important; }
.dropdown-menu .pay-logout-item:hover,
.dropdown-menu .pay-logout-item:focus { background: rgba(220, 53, 69, .12) !important; color: #dc3545 !important; }

/* profile page: large avatar and password strength meter */
.pay-avatar-xl .pay-avatar { width: 96px; height: 96px; font-size: 32px; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, .18); }
.pay-pw-meter { height: 6px; border-radius: 3px; background: #e9ecef; overflow: hidden; }
.pay-pw-meter span { display: block; height: 100%; width: 0; transition: width .2s ease, background .2s ease; }

/* profile page: compact tab pills and icon buttons */
#profile-tabs { display: flex; flex-wrap: nowrap; gap: .4rem; margin-bottom: 1rem !important; border-bottom: 1px solid rgba(0, 0, 0, .08); padding-bottom: .5rem; }
#profile-tabs .nav-item { flex: 0 0 auto; margin: 0 !important; }
#profile-tabs .nav-link {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .4rem .85rem !important; font-size: 14px !important; line-height: 1.3 !important; margin: 0 !important;
    color: #343f52; border-radius: .5rem; background: transparent;
}
#profile-tabs .nav-link:hover { background: rgba(63, 120, 224, .07); color: var(--bs-primary, #3f78e0); }
#profile-tabs .nav-link.active { background: rgba(63, 120, 224, .12) !important; color: var(--bs-primary, #3f78e0) !important; font-weight: 700; }
.pay-profile-photo .btn { display: inline-flex; align-items: center; gap: .3rem; }
#pane-profile .btn-primary, #pane-password .btn-primary { display: inline-flex; align-items: center; gap: .35rem; }
