/**
 * Popup Notification Styles
 * Professional, modern popup notifications with animated emojis and themes
 */

/* Overlay */
.popup-notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.popup-notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Popup Container */
.popup-notification {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    transform: scale(0.7) translateY(50px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.popup-notification-overlay.active .popup-notification {
    transform: scale(1) translateY(0);
}

/* Close Button */
.popup-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-close-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: rotate(90deg);
}

/* Large Animated Emoji */
.popup-emoji {
    font-size: 100px;
    line-height: 1;
    margin-bottom: 20px;
    display: inline-block;
    animation: emojiEntrance 0.8s ease-out forwards, wobble 2s ease-in-out 0.8s infinite;
}

.popup-emoji-container {
    position: relative;
    display: inline-block;
}

/* Secondary emojis floating around */
.popup-emoji-secondary {
    position: absolute;
    font-size: 30px;
    opacity: 0;
    animation: floatEmoji 3s ease-in-out infinite;
}

.popup-emoji-secondary:nth-child(2) {
    top: -10px;
    left: -30px;
    animation-delay: 0s;
}

.popup-emoji-secondary:nth-child(3) {
    top: -10px;
    right: -30px;
    animation-delay: 0.5s;
}

.popup-emoji-secondary:nth-child(4) {
    bottom: 0;
    left: -20px;
    animation-delay: 1s;
}

.popup-emoji-secondary:nth-child(5) {
    bottom: 0;
    right: -20px;
    animation-delay: 1.5s;
}

/* Title */
.popup-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1f2937;
    line-height: 1.3;
}

/* Message */
.popup-message {
    font-size: 16px;
    color: #4b5563;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Subtitle */
.popup-subtitle {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 28px;
    font-style: italic;
}

/* Action Button */
.popup-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.popup-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.popup-action-btn:active {
    transform: translateY(-1px);
}

/* ============================================
   WELCOME THEME (Green/Gold - Celebration)
   ============================================ */
.popup-notification.theme-welcome {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #fef9c3 100%);
    border: 2px solid #22c55e;
}

.popup-notification.theme-welcome .popup-title {
    background: linear-gradient(135deg, #16a34a, #eab308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-notification.theme-welcome .popup-action-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.popup-notification.theme-welcome .popup-action-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

/* Confetti effect for welcome */
.popup-notification.theme-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle, #22c55e 2px, transparent 2px),
        radial-gradient(circle, #eab308 2px, transparent 2px),
        radial-gradient(circle, #3b82f6 2px, transparent 2px);
    background-size: 60px 60px, 80px 80px, 100px 100px;
    background-position: 0 0, 30px 30px, 60px 10px;
    opacity: 0.15;
    animation: confettiFloat 20s linear infinite;
    pointer-events: none;
}

/* ============================================
   SORRY THEME (Blue/Gray - Empathetic)
   ============================================ */
.popup-notification.theme-sorry {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    border: 2px solid #94a3b8;
}

.popup-notification.theme-sorry .popup-emoji {
    animation: emojiEntrance 0.8s ease-out forwards, sadWobble 3s ease-in-out 0.8s infinite;
}

.popup-notification.theme-sorry .popup-title {
    color: #475569;
}

.popup-notification.theme-sorry .popup-action-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.popup-notification.theme-sorry .popup-action-btn:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

/* ============================================
   CELEBRATION THEME (Festive - Red/Gold/Green)
   ============================================ */
.popup-notification.theme-celebration {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 30%, #fef9c3 70%, #dcfce7 100%);
    border: 2px solid #dc2626;
}

.popup-notification.theme-celebration .popup-emoji {
    animation: emojiEntrance 0.8s ease-out forwards, celebrateWobble 1.5s ease-in-out 0.8s infinite;
}

.popup-notification.theme-celebration .popup-title {
    background: linear-gradient(135deg, #dc2626, #16a34a, #eab308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-notification.theme-celebration .popup-action-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #16a34a 100%);
    color: white;
}

.popup-notification.theme-celebration .popup-action-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 50%, #15803d 100%);
}

/* Sparkle effect for celebration */
.popup-notification.theme-celebration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle, #fbbf24 3px, transparent 3px),
        radial-gradient(circle, #dc2626 2px, transparent 2px),
        radial-gradient(circle, #22c55e 2px, transparent 2px);
    background-size: 50px 50px, 70px 70px, 90px 90px;
    background-position: 0 0, 25px 25px, 50px 10px;
    opacity: 0.2;
    animation: sparkle 2s ease-in-out infinite;
    pointer-events: none;
}

/* ============================================
   DEFAULT THEME (Blue - Professional)
   ============================================ */
.popup-notification.theme-default {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
}

.popup-notification.theme-default .popup-title {
    color: #1e40af;
}

.popup-notification.theme-default .popup-action-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
}

.popup-notification.theme-default .popup-action-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Emoji entrance animation */
@keyframes emojiEntrance {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-45deg);
    }

    50% {
        transform: scale(1.3) rotate(10deg);
    }

    70% {
        transform: scale(0.9) rotate(-5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Happy wobble animation */
@keyframes wobble {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    15% {
        transform: rotate(-12deg) scale(1.05);
    }

    30% {
        transform: rotate(10deg) scale(1.02);
    }

    45% {
        transform: rotate(-8deg) scale(1.08);
    }

    60% {
        transform: rotate(6deg) scale(1.02);
    }

    75% {
        transform: rotate(-4deg) scale(1.05);
    }
}

/* Sad/sorry wobble (slower, gentler) */
@keyframes sadWobble {

    0%,
    100% {
        transform: rotate(0deg) translateY(0);
    }

    25% {
        transform: rotate(-3deg) translateY(3px);
    }

    50% {
        transform: rotate(2deg) translateY(5px);
    }

    75% {
        transform: rotate(-2deg) translateY(3px);
    }
}

/* Celebration wobble (more energetic) */
@keyframes celebrateWobble {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    10% {
        transform: rotate(-15deg) scale(1.1);
    }

    20% {
        transform: rotate(15deg) scale(1.15);
    }

    30% {
        transform: rotate(-12deg) scale(1.1);
    }

    40% {
        transform: rotate(12deg) scale(1.12);
    }

    50% {
        transform: rotate(-8deg) scale(1.08);
    }

    60% {
        transform: rotate(8deg) scale(1.1);
    }

    70% {
        transform: rotate(-5deg) scale(1.05);
    }

    80% {
        transform: rotate(5deg) scale(1.08);
    }

    90% {
        transform: rotate(-3deg) scale(1.02);
    }
}

/* Floating secondary emojis */
@keyframes floatEmoji {

    0%,
    100% {
        opacity: 0.7;
        transform: translateY(0) rotate(0deg);
    }

    25% {
        opacity: 1;
        transform: translateY(-8px) rotate(10deg);
    }

    50% {
        opacity: 0.8;
        transform: translateY(-5px) rotate(-5deg);
    }

    75% {
        opacity: 1;
        transform: translateY(-10px) rotate(8deg);
    }
}

/* Confetti floating */
@keyframes confettiFloat {
    0% {
        background-position: 0 0, 30px 30px, 60px 10px;
    }

    100% {
        background-position: 0 200px, 30px 230px, 60px 210px;
    }
}

/* Sparkle effect */
@keyframes sparkle {

    0%,
    100% {
        opacity: 0.15;
    }

    50% {
        opacity: 0.3;
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .popup-notification {
        padding: 30px 24px;
        margin: 16px;
        border-radius: 20px;
    }

    .popup-emoji {
        font-size: 80px;
    }

    .popup-title {
        font-size: 22px;
    }

    .popup-message {
        font-size: 14px;
    }

    .popup-action-btn {
        padding: 14px 32px;
        font-size: 15px;
        width: 100%;
    }

    .popup-emoji-secondary {
        font-size: 24px;
    }
}