/**
 * Achievement Notification Styles
 *
 * Celebratory notification styling for achievement unlocks.
 * Uses theme variables for consistent theming.
 */

/* Container - holds all achievement notifications */
.achievement-notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Individual notification */
.achievement-notification {
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 380px;
    max-width: calc(100vw - 40px);
}

.achievement-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.achievement-notification.dismissing {
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.3s ease-out;
}

/* Inner wrapper with border */
.achievement-notification-inner {
    position: relative;
    background: var(--card-bg, #2a2a2a);
    border: 2px solid var(--border-color, #3a3a3a);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Glow effect behind notification */
.achievement-notification-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    animation: achievementGlow 2s ease-in-out infinite;
    pointer-events: none;
}

/* Tier-specific border colors */
.achievement-tier-bronze .achievement-notification-inner {
    border-color: #cd7f32;
}

.achievement-tier-silver .achievement-notification-inner {
    border-color: #c0c0c0;
}

.achievement-tier-gold .achievement-notification-inner {
    border-color: #ffd700;
}

.achievement-tier-platinum .achievement-notification-inner {
    border-color: #e5e4e2;
}

.achievement-tier-diamond .achievement-notification-inner {
    border-color: #b9f2ff;
}

/* Tier-specific glow colors */
.achievement-tier-bronze .achievement-notification-glow {
    background: radial-gradient(circle, rgba(205, 127, 50, 0.15) 0%, transparent 70%);
}

.achievement-tier-silver .achievement-notification-glow {
    background: radial-gradient(circle, rgba(192, 192, 192, 0.15) 0%, transparent 70%);
}

.achievement-tier-gold .achievement-notification-glow {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
}

.achievement-tier-platinum .achievement-notification-glow {
    background: radial-gradient(circle, rgba(229, 228, 226, 0.2) 0%, transparent 70%);
}

.achievement-tier-diamond .achievement-notification-glow {
    background: radial-gradient(circle, rgba(185, 242, 255, 0.25) 0%, transparent 70%);
}

/* Content area */
.achievement-notification-content {
    position: relative;
    padding: 16px;
}

/* Header with "Achievement Unlocked" text */
.achievement-notification-header {
    text-align: center;
    margin-bottom: 12px;
}

.achievement-unlock-text {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-warning, #f39c12);
    animation: achievementPulse 1.5s ease-in-out infinite;
}

/* Body with icon and details */
.achievement-notification-body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* Achievement icon */
.achievement-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--surface-secondary, #333);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    animation: achievementBounce 0.6s ease-out;
}

.achievement-icon-large {
    width: 64px;
    height: 64px;
    font-size: 32px;
}

/* Achievement details */
.achievement-details {
    flex: 1;
    min-width: 0;
}

.achievement-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    line-height: 1.3;
}

.achievement-description {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    line-height: 1.4;
}

/* Meta information (tier + points) */
.achievement-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.achievement-tier {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-tier.tier-bronze {
    background: rgba(205, 127, 50, 0.2);
    color: #cd7f32;
}

.achievement-tier.tier-silver {
    background: rgba(192, 192, 192, 0.2);
    color: #c0c0c0;
}

.achievement-tier.tier-gold {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.achievement-tier.tier-platinum {
    background: rgba(229, 228, 226, 0.2);
    color: #e5e4e2;
}

.achievement-tier.tier-diamond {
    background: rgba(185, 242, 255, 0.2);
    color: #b9f2ff;
}

.achievement-points {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-success, #27ae60);
}

/* Bulk unlock styles */
.achievement-bulk .achievement-notification-inner {
    border-color: var(--color-primary, #3498db);
}

.achievement-bulk .achievement-notification-glow {
    background: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, transparent 70%);
}

.achievement-bulk-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.achievement-bulk-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #3a3a3a);
}

.achievement-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--surface-secondary, #333);
    border-radius: 6px;
}

.achievement-mini-icon {
    font-size: 16px;
}

.achievement-mini-name {
    font-size: 12px;
    color: var(--text-primary, #fff);
    font-weight: 500;
}

.achievement-mini-more {
    font-size: 12px;
    color: var(--text-muted, #666);
    text-align: center;
    padding: 4px;
}

/* Animations */
@keyframes achievementGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes achievementPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes achievementBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Light theme adjustments */
body:not(.dark-theme) .achievement-notification-inner {
    background: var(--card-bg, #fff);
    border-color: var(--border-color, #ddd);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body:not(.dark-theme) .achievement-icon {
    background: var(--surface-secondary, #f0f0f0);
}

body:not(.dark-theme) .achievement-mini {
    background: var(--surface-secondary, #f5f5f5);
}

body:not(.dark-theme) .achievement-notification-glow {
    opacity: 0.3;
}

/* Responsive styles */
@media (max-width: 768px) {
    .achievement-notification-container {
        top: 70px;
        right: 10px;
        left: 10px;
    }

    .achievement-notification {
        width: 100%;
        max-width: none;
    }

    .achievement-notification-body {
        gap: 12px;
    }

    .achievement-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .achievement-name {
        font-size: 14px;
    }

    .achievement-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .achievement-notification-content {
        padding: 12px;
    }

    .achievement-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .achievement-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
