/**
 * /assets/css/notifications.css
 *
 * Purpose:  RPG banner notification styles (glassmorphism design system)
 * Deps:     app.css (CSS variables: --accent, --danger, --exp, --gold, --ok, --bg, --card)
 * Load:     index.php
 * Version:  1.0.0
 */

/* =============================================================================
   BANNER HOST (fixed bottom container)
   ============================================================================= */

#rpgNotifyHost {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

/* =============================================================================
   BANNER BASE
   ============================================================================= */

.rpg-banner {
    pointer-events: auto;
    max-width: 480px;
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(22, 27, 34, 0.92);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
}

.rpg-banner--visible {
    transform: translateY(0);
    opacity: 1;
}

.rpg-banner--hiding {
    transform: translateY(24px);
    opacity: 0;
}

/* =============================================================================
   THEME VARIANTS
   ============================================================================= */

/* Success (teal accent) */
.rpg-banner--success {
    border-left-color: var(--accent, #5dd6c9);
}

.rpg-banner--success .rpg-banner__icon {
    background: rgba(93, 214, 201, 0.12);
    border-color: rgba(93, 214, 201, 0.25);
    color: var(--accent, #5dd6c9);
}

/* Error / Danger (red) */
.rpg-banner--error,
.rpg-banner--danger {
    border-left-color: var(--danger, #ff6b6b);
    background: rgba(40, 20, 22, 0.92);
}

.rpg-banner--error .rpg-banner__icon,
.rpg-banner--danger .rpg-banner__icon {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
    color: var(--danger, #ff6b6b);
}

/* Info (blue) */
.rpg-banner--info {
    border-left-color: var(--exp, #4da3ff);
}

.rpg-banner--info .rpg-banner__icon {
    background: rgba(77, 163, 255, 0.12);
    border-color: rgba(77, 163, 255, 0.25);
    color: var(--exp, #4da3ff);
}

/* Warning (gold) */
.rpg-banner--warning {
    border-left-color: var(--gold, #ffd36b);
}

.rpg-banner--warning .rpg-banner__icon {
    background: rgba(255, 211, 107, 0.12);
    border-color: rgba(255, 211, 107, 0.25);
    color: var(--gold, #ffd36b);
}

/* =============================================================================
   ICON BADGE
   ============================================================================= */

.rpg-banner__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
}

/* =============================================================================
   AVATAR IMAGE (RPG events)
   ============================================================================= */

.rpg-banner__img {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* =============================================================================
   BODY
   ============================================================================= */

.rpg-banner__body {
    flex: 1;
    min-width: 0;
}

.rpg-banner__title {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.95);
}

.rpg-banner__meta {
    font-size: 0.82rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 2px;
}

.rpg-banner__text {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.92);
}

/* =============================================================================
   CLOSE BUTTON
   ============================================================================= */

.rpg-banner__close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: 18px;
    line-height: 1;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.rpg-banner__close:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 576px) {
    #rpgNotifyHost {
        bottom: calc(var(--tabbarH, 72px) + var(--safeB, 0px) + 8px);
        padding: 0 8px;
    }

    .rpg-banner {
        max-width: 100%;
        border-radius: 12px;
        padding: 10px 12px;
        gap: 10px;
    }

    .rpg-banner__icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .rpg-banner__img {
        width: 38px;
        height: 38px;
    }
}

/* =============================================================================
   REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    .rpg-banner {
        transition: none;
    }

    .rpg-banner__close {
        transition: none;
    }
}
