/* Sticky-bar Rank/Achievement toast positioning, achievement toast visuals, and sticky activity animation styles. */

/* Shared fixed anchor for selected-viewer sticky-bar celebration toasts. */
.achievement-toast,
.rank-toast {
    position: fixed;
    right: 24px;
    top: 112px;
    width: min(390px, calc(100vw - 32px));
}

.achievement-toast {
    z-index: 10020;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 211, 126, 0.72);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(10, 24, 42, 0.98), rgba(35, 30, 20, 0.96));
    box-shadow: 0 0 36px rgba(255, 211, 126, 0.28), 0 18px 36px rgba(0, 0, 0, 0.45);
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    animation: achievementToastIn 520ms ease-out forwards, achievementToastOut 520ms ease-in 7.6s forwards;
}

.achievement-toast {
    overflow: hidden;
}

.achievement-toast::before {
    content: "";
    position: absolute;
    inset: -70% -30%;
    z-index: 1;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.22) 48%, transparent 60%);
    transform: translateX(-45%);
    animation: stickyAchievementSweep 1.5s ease-out 180ms;
    pointer-events: none;
}

.achievement-toast-icon,
.achievement-toast-copy {
    position: relative;
    z-index: 2;
}

.achievement-toast:hover,
.achievement-toast:focus-visible {
    border-color: rgba(255, 211, 126, 0.92);
    box-shadow: 0 0 42px rgba(255, 211, 126, 0.34), 0 18px 40px rgba(0, 0, 0, 0.52);
    outline: none;
}

.achievement-toast:hover .achievement-toast-title,
.achievement-toast:focus-visible .achievement-toast-title {
    color: #ffe9a6;
}

.achievement-toast-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px solid rgba(255, 211, 126, 0.54);
    background: rgba(255, 211, 126, 0.10);
    box-shadow: inset 0 0 20px rgba(255, 211, 126, 0.08);
}

.achievement-toast-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 9px rgba(255, 211, 126, 0.65));
}

.achievement-toast-kicker {
    color: var(--warning);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.achievement-toast-title {
    margin-top: 3px;
    color: var(--text);
    font-size: 19px;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.achievement-toast-sub {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

@keyframes stickyAchievementPulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

@keyframes stickyAchievementSweep {
    from { transform: translateX(-45%); }
    to { transform: translateX(45%); }
}

@keyframes achievementToastIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes achievementToastOut {
    to { opacity: 0; transform: translateY(-8px) scale(0.985); }
}

@media (max-width: 760px) {
    .achievement-toast,
    .rank-toast {
        top: 134px;
        right: 9px;
        left: 9px;
        width: auto;
    }
}
