/* TNDA Fake Notifications - Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ============ CONTAINER ============ */
.tnda-fn-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}
.tnda-fn-bottom-left  { bottom: 20px; left: 20px; }
.tnda-fn-bottom-right { bottom: 20px; right: 20px; }
.tnda-fn-top-left     { top: 80px; left: 20px; }
.tnda-fn-top-right    { top: 80px; right: 20px; }

/* ============ NOTIFICATION BASE ============ */
.tnda-fn-popup {
    pointer-events: all;
    width: 320px;
    max-width: calc(100vw - 40px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    will-change: transform, opacity;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tnda-fn-popup:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 50px rgba(0,0,0,0.2);
}

/* Inner layout */
.tnda-fn-popup-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 12px;
    position: relative;
}

/* Avatar */
.tnda-fn-popup-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Body */
.tnda-fn-popup-body { flex: 1; min-width: 0; }
.tnda-fn-popup-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 8px; border-radius: 20px; margin-bottom: 5px;
}
.tnda-fn-popup-name {
    font-size: 14px; font-weight: 800;
    line-height: 1.2; margin-bottom: 2px;
}
.tnda-fn-popup-action { font-size: 11px; margin-bottom: 2px; }
.tnda-fn-popup-course {
    font-size: 12px; font-weight: 700;
    line-height: 1.4; margin-bottom: 8px;
}
.tnda-fn-popup-meta {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.tnda-fn-popup-location,
.tnda-fn-popup-time {
    font-size: 10px;
    padding: 2px 8px; border-radius: 20px;
    font-weight: 500;
}

/* Verified badge */
.tnda-fn-popup-verified {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
    flex-shrink: 0; align-self: center;
    background: #27ae60; color: #fff;
}

/* Progress Bar */
.tnda-fn-popup-progress {
    height: 3px;
    width: 100%;
    transform-origin: left;
}

/* Close Button */
.tnda-fn-popup-close {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; cursor: pointer;
    font-size: 14px; line-height: 1;
    width: 22px; height: 22px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s; opacity: 0.5;
    font-family: sans-serif;
}
.tnda-fn-popup-close:hover { opacity: 1; background: rgba(0,0,0,0.1); }

/* ============ THEME: MODERN (Default) ============ */
.tnda-fn-theme-modern .tnda-fn-popup {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
}
.tnda-fn-theme-modern .tnda-fn-popup-avatar {
    background: linear-gradient(135deg, #e94560, #0f3460);
    color: #fff;
}
.tnda-fn-theme-modern .tnda-fn-popup-badge {
    background: rgba(233,69,96,0.1); color: #e94560;
}
.tnda-fn-theme-modern .tnda-fn-popup-name { color: #1a1a2e; }
.tnda-fn-theme-modern .tnda-fn-popup-action { color: #888; }
.tnda-fn-theme-modern .tnda-fn-popup-course { color: #0f3460; }
.tnda-fn-theme-modern .tnda-fn-popup-location,
.tnda-fn-theme-modern .tnda-fn-popup-time { background: #f5f5f5; color: #666; }
.tnda-fn-theme-modern .tnda-fn-popup-progress { background: linear-gradient(to right, #e94560, #0f3460); }
.tnda-fn-theme-modern .tnda-fn-popup-close { color: #666; }

/* ============ THEME: DARK ============ */
.tnda-fn-theme-dark .tnda-fn-popup {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}
.tnda-fn-theme-dark .tnda-fn-popup-avatar {
    background: linear-gradient(135deg, #e94560, #533483);
    color: #fff;
}
.tnda-fn-theme-dark .tnda-fn-popup-badge { background: rgba(233,69,96,0.2); color: #ff6b81; }
.tnda-fn-theme-dark .tnda-fn-popup-name { color: #fff; }
.tnda-fn-theme-dark .tnda-fn-popup-action { color: rgba(255,255,255,0.5); }
.tnda-fn-theme-dark .tnda-fn-popup-course { color: #7eb2ff; }
.tnda-fn-theme-dark .tnda-fn-popup-location,
.tnda-fn-theme-dark .tnda-fn-popup-time { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.tnda-fn-theme-dark .tnda-fn-popup-progress { background: linear-gradient(to right, #e94560, #533483); }
.tnda-fn-theme-dark .tnda-fn-popup-close { color: rgba(255,255,255,0.5); }
.tnda-fn-theme-dark .tnda-fn-popup-close:hover { background: rgba(255,255,255,0.1); }

/* ============ THEME: GRADIENT ============ */
.tnda-fn-theme-gradient .tnda-fn-popup {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 1px solid rgba(255,255,255,0.15);
}
.tnda-fn-theme-gradient .tnda-fn-popup-avatar {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #1a1a2e;
}
.tnda-fn-theme-gradient .tnda-fn-popup-badge { background: rgba(247,151,30,0.2); color: #ffd200; }
.tnda-fn-theme-gradient .tnda-fn-popup-name { color: #fff; }
.tnda-fn-theme-gradient .tnda-fn-popup-action { color: rgba(255,255,255,0.6); }
.tnda-fn-theme-gradient .tnda-fn-popup-course { color: #ffd200; }
.tnda-fn-theme-gradient .tnda-fn-popup-location,
.tnda-fn-theme-gradient .tnda-fn-popup-time { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
.tnda-fn-theme-gradient .tnda-fn-popup-verified { background: #ffd200; color: #1a1a2e; }
.tnda-fn-theme-gradient .tnda-fn-popup-progress { background: linear-gradient(to right, #f7971e, #ffd200); }
.tnda-fn-theme-gradient .tnda-fn-popup-close { color: rgba(255,255,255,0.6); }
.tnda-fn-theme-gradient .tnda-fn-popup-close:hover { background: rgba(255,255,255,0.15); }

/* ============ THEME: MINIMAL ============ */
.tnda-fn-theme-minimal .tnda-fn-popup {
    background: #fff;
    border: 2px solid #1a1a2e;
    box-shadow: 4px 4px 0 #1a1a2e;
    border-radius: 12px;
}
.tnda-fn-theme-minimal .tnda-fn-popup-avatar {
    background: #1a1a2e;
    color: #fff; border-radius: 8px;
}
.tnda-fn-theme-minimal .tnda-fn-popup-badge { background: #1a1a2e; color: #fff; border-radius: 4px; }
.tnda-fn-theme-minimal .tnda-fn-popup-name { color: #1a1a2e; }
.tnda-fn-theme-minimal .tnda-fn-popup-action { color: #666; }
.tnda-fn-theme-minimal .tnda-fn-popup-course { color: #1a1a2e; }
.tnda-fn-theme-minimal .tnda-fn-popup-location,
.tnda-fn-theme-minimal .tnda-fn-popup-time { background: #f0f0f0; color: #444; border-radius: 4px; }
.tnda-fn-theme-minimal .tnda-fn-popup-verified { background: #1a1a2e; border-radius: 4px; }
.tnda-fn-theme-minimal .tnda-fn-popup-progress { background: #1a1a2e; }
.tnda-fn-theme-minimal .tnda-fn-popup-close { color: #333; }

/* ============ ANIMATIONS ============ */

/* Slide (default) */
.tnda-fn-anim-slide.tnda-fn-enter {
    animation: tndaSlideEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.tnda-fn-anim-slide.tnda-fn-exit {
    animation: tndaSlideExit 0.35s ease-in forwards;
}

.tnda-fn-container.tnda-fn-bottom-right .tnda-fn-anim-slide.tnda-fn-enter,
.tnda-fn-container.tnda-fn-top-right .tnda-fn-anim-slide.tnda-fn-enter {
    animation-name: tndaSlideEnterRight;
}
.tnda-fn-container.tnda-fn-bottom-right .tnda-fn-anim-slide.tnda-fn-exit,
.tnda-fn-container.tnda-fn-top-right .tnda-fn-anim-slide.tnda-fn-exit {
    animation-name: tndaSlideExitRight;
}

@keyframes tndaSlideEnter { from { opacity:0; transform:translateX(-110%); } to { opacity:1; transform:translateX(0); } }
@keyframes tndaSlideExit  { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(-110%); } }
@keyframes tndaSlideEnterRight { from { opacity:0; transform:translateX(110%); } to { opacity:1; transform:translateX(0); } }
@keyframes tndaSlideExitRight  { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(110%); } }

/* Fade */
.tnda-fn-anim-fade.tnda-fn-enter { animation: tndaFadeIn 0.4s ease forwards; }
.tnda-fn-anim-fade.tnda-fn-exit  { animation: tndaFadeOut 0.3s ease forwards; }
@keyframes tndaFadeIn  { from { opacity:0; transform:scale(0.92); } to { opacity:1; transform:scale(1); } }
@keyframes tndaFadeOut { from { opacity:1; transform:scale(1); } to { opacity:0; transform:scale(0.92); } }

/* Bounce */
.tnda-fn-anim-bounce.tnda-fn-enter { animation: tndaBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.tnda-fn-anim-bounce.tnda-fn-exit  { animation: tndaBounceOut 0.3s ease forwards; }
@keyframes tndaBounceIn  { from { opacity:0; transform:translateY(40px) scale(0.85); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes tndaBounceOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(20px); } }

/* Flip */
.tnda-fn-anim-flip.tnda-fn-enter { animation: tndaFlipIn 0.5s ease forwards; perspective: 1000px; }
.tnda-fn-anim-flip.tnda-fn-exit  { animation: tndaFlipOut 0.35s ease forwards; }
@keyframes tndaFlipIn  { from { opacity:0; transform:rotateX(-30deg) translateY(20px); } to { opacity:1; transform:rotateX(0) translateY(0); } }
@keyframes tndaFlipOut { from { opacity:1; transform:rotateX(0); } to { opacity:0; transform:rotateX(30deg); } }

/* Progress bar animation */
.tnda-fn-popup-progress.tnda-fn-progress-animate {
    animation: tndaProgressShrink linear forwards;
}
@keyframes tndaProgressShrink { from { transform:scaleX(1); } to { transform:scaleX(0); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
    .tnda-fn-container { left: 10px !important; right: 10px !important; width: calc(100vw - 20px); }
    .tnda-fn-popup { width: 100%; max-width: 100%; border-radius: 12px; }
    .tnda-fn-popup-name { font-size: 13px; }
    .tnda-fn-popup-course { font-size: 11px; }
}

@media (max-width: 360px) {
    .tnda-fn-popup-inner { gap: 10px; padding: 12px 12px 10px; }
    .tnda-fn-popup-avatar { width: 40px; height: 40px; font-size: 13px; }
}
