/**
 * Premium User Notification Styles
 * Implements Glassmorphism, Neon glows, and high-fidelity transitions
 */

/* ==========================================================================
   1. Core Container & Positioning
   ========================================================================== */
.fv-notification-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 999999;
    pointer-events: none;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base style for all notification items */
.fv-notification-item {
    pointer-events: auto;
    position: fixed;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    
    /* Core Glassmorphism */
    background: rgba(15, 23, 42, 0.85); /* Slate 900 with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    color: #f1f5f9;
}

/* ==========================================================================
   2. Layout Styles (Banner, Toast, Modal)
   ========================================================================== */

/* --- A. TOP STICKY BANNER --- */
.fv-notification-item.fv-layout-banner {
    top: 0;
    left: 0;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    animation: fvBannerSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fv-notification-item.fv-layout-banner.fv-closing {
    animation: fvBannerSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fv-layout-banner .fv-notification-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
}

.fv-layout-banner .fv-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

/* --- B. SLIDE-IN TOAST (Bottom Right) --- */
.fv-notification-item.fv-layout-toast {
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    transform: translateY(100px) scale(0.9);
    animation: fvToastSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border-left: 4px solid var(--fv-noti-accent, #3b82f6);
}

.fv-notification-item.fv-layout-toast.fv-closing {
    animation: fvToastSlideOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fv-layout-toast .fv-notification-content-wrapper {
    padding: 18px;
}

.fv-layout-toast .fv-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* --- C. OVERLAY MODAL (Center Screen) --- */
.fv-notification-item.fv-layout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1; /* handled inside wrapper animation */
}

/* Modal Overlay Backdrop */
.fv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 10, 15, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
    opacity: 0;
    animation: fvFadeIn 0.4s ease forwards;
}

.fv-layout-modal.fv-closing .fv-modal-overlay {
    animation: fvFadeOut 0.4s ease forwards;
}

/* Content Box inside Modal */
.fv-layout-modal .fv-notification-content-wrapper {
    position: relative;
    z-index: 2;
    width: 500px;
    max-width: calc(100vw - 40px);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    padding: 28px;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    animation: fvModalZoomIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fv-layout-modal.fv-closing .fv-notification-content-wrapper {
    animation: fvModalZoomOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fv-layout-modal .fv-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

/* ==========================================================================
   3. Types Styles (Info, Success, Warning, Danger, Premium)
   ========================================================================== */

/* Custom Color Tokens (HSL based for elegant saturation) */
.fv-noti-info    { --fv-noti-accent: #0284c7; --fv-noti-glow: rgba(14, 165, 233, 0.2); }
.fv-noti-success { --fv-noti-accent: #16a34a; --fv-noti-glow: rgba(34, 197, 94, 0.2); }
.fv-noti-warning { --fv-noti-accent: #d97706; --fv-noti-glow: rgba(245, 158, 11, 0.2); }
.fv-noti-danger  { --fv-noti-accent: #dc2626; --fv-noti-glow: rgba(239, 68, 68, 0.25); }
.fv-noti-premium { --fv-noti-accent: #c084fc; --fv-noti-glow: rgba(168, 85, 247, 0.35); }

/* Apply accent border for layouts */
.fv-notification-item.fv-layout-banner {
    border-bottom: 3px solid var(--fv-noti-accent);
}

.fv-notification-item.fv-layout-modal .fv-notification-content-wrapper {
    border-top: 4px solid var(--fv-noti-accent);
}

/* Premium / Promo Visual Accent (Glowing Linear Gradient) */
.fv-noti-premium.fv-layout-banner {
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #a855f7, #eab308, #6366f1) 1;
}
.fv-noti-premium.fv-layout-toast {
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, #a855f7, #6366f1) 1;
    box-shadow: 0 10px 30px -5px rgba(168, 85, 247, 0.25);
}
.fv-noti-premium .fv-notification-content-wrapper {
    box-shadow: 0 20px 40px -10px rgba(168, 85, 247, 0.15);
}

/* ==========================================================================
   4. Interior Elements Styling
   ========================================================================== */
.fv-notification-title-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Notification Accent Icons */
.fv-noti-icon {
    width: 20px;
    height: 20px;
    color: var(--fv-noti-accent);
    flex-shrink: 0;
}

/* Premium gradient icon */
.fv-noti-premium .fv-noti-icon {
    color: #eab308;
    filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.6));
}

.fv-notification-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.fv-layout-modal .fv-notification-title {
    font-size: 18px;
}

.fv-notification-body {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e1; /* Slate 300 */
}

.fv-notification-body p {
    margin: 0 0 8px 0;
}
.fv-notification-body p:last-child {
    margin: 0;
}

.fv-notification-body a {
    color: var(--fv-noti-accent);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.fv-notification-body a:hover {
    color: #ffffff;
}

/* Premium link styling */
.fv-noti-premium .fv-notification-body a {
    color: #c084fc;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.3);
}

/* --- CLOSE BUTTON --- */
.fv-notification-close {
    background: transparent;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: #94a3b8; /* Slate 400 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    pointer-events: auto;
}

.fv-notification-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: rotate(90deg);
}

.fv-close-svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   5. KEYFRAME ANIMATIONS
   ========================================================================== */

/* A. Banners */
@keyframes fvBannerSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fvBannerSlideUp {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

/* B. Toasts */
@keyframes fvToastSlideIn {
    from { transform: translateY(80px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes fvToastSlideOut {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to { transform: translateY(40px) scale(0.9); opacity: 0; }
}

/* C. Modals */
@keyframes fvModalZoomIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes fvModalZoomOut {
    from { transform: scale(1) translateY(0); opacity: 1; }
    to { transform: scale(0.9) translateY(15px); opacity: 0; }
}

/* D. Fade Actions */
@keyframes fvFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fvFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ==========================================================================
   6. RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 600px) {
    .fv-notification-item.fv-layout-toast {
        bottom: 12px;
        right: 12px;
        width: calc(100vw - 24px);
        max-width: none;
    }
    
    .fv-notification-item.fv-layout-banner .fv-notification-content-wrapper {
        padding: 10px 16px;
    }
    
    .fv-layout-modal .fv-notification-content-wrapper {
        padding: 20px;
    }
}
