/* ========================================
   Luxury Notifications - Frontend Styles
   طراحی شده توسط atremahdi.ir
   ======================================== */

:root {
    --ln-primary: #D4AF37;
    --ln-bg: #1A1A2E;
    --ln-text: #FFFFFF;
    --ln-width: 380px;
    --ln-radius: 16px;
    --ln-z-index: 99999;
    --ln-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    --ln-glow: 0 0 30px rgba(212, 175, 55, 0.4);
}

/* کانتینر اصلی */
.luxury-notif-container {
    position: fixed;
    z-index: var(--ln-z-index);
    pointer-events: none;
    max-width: 100%;
}

.luxury-notif-container.ln-pos-top-left      { top: 24px; left: 24px; }
.luxury-notif-container.ln-pos-top-right     { top: 24px; right: 24px; }
.luxury-notif-container.ln-pos-top-center     { top: 24px; left: 50%; transform: translateX(-50%); }
.luxury-notif-container.ln-pos-bottom-left   { bottom: 24px; left: 24px; }
.luxury-notif-container.ln-pos-bottom-right  { bottom: 24px; right: 24px; }
.luxury-notif-container.ln-pos-bottom-center { bottom: 24px; left: 50%; transform: translateX(-50%); }

/* موقعیت وسط صفحه - مرکز دقیق صفحه */
.luxury-notif-container.ln-pos-center-screen {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* خود پیام */
.luxury-notif {
    pointer-events: auto;
    width: var(--ln-width);
    max-width: calc(100vw - 48px);
    background: var(--ln-bg);
    color: var(--ln-text);
    border-radius: var(--ln-radius);
    padding: 20px 22px 22px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    font-family: 'Vazirmatn', 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
    box-shadow: var(--ln-shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    direction: rtl;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* پس‌زمینه گرادیان طلایی بسیار لاکچری */
.luxury-notif::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--ln-primary) 20%,
        var(--ln-primary) 80%,
        transparent 100%);
    z-index: 2;
}

/* افکت درخشش روی گوشه */
.luxury-notif::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* آیکون */
.luxury-notif .ln-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ln-primary), color-mix(in srgb, var(--ln-primary) 60%, #000));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--ln-primary) 40%, transparent),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.luxury-notif .ln-icon-emoji {
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* محتوا */
.luxury-notif .ln-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.luxury-notif .ln-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ln-primary);
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.luxury-notif .ln-message {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ln-text);
    opacity: 0.95;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* دکمه بستن */
.luxury-notif .ln-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--ln-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.6;
    transition: all 0.2s ease;
    position: relative;
    z-index: 3;
    user-select: none;
    border: none;
    padding: 0;
}

.luxury-notif .ln-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* نوار پیشرفت */
.luxury-notif .ln-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ln-primary);
    width: 100%;
    transform-origin: left center;
    z-index: 3;
    box-shadow: 0 0 8px var(--ln-primary);
}

.luxury-notif .ln-progress.ln-rtl-progress {
    transform-origin: right center;
}

/* =============== انیمیشن‌ها =============== */

/* Slide */
.luxury-notif.ln-anim-slide.ln-enter {
    animation: ln-slide-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.luxury-notif.ln-anim-slide.ln-exit {
    animation: ln-slide-out 0.4s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes ln-slide-in {
    from {
        opacity: 0;
        transform: translateX(var(--ln-slide-from, 120%));
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ln-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(var(--ln-slide-from, 120%));
    }
}

/* Fade */
.luxury-notif.ln-anim-fade.ln-enter {
    animation: ln-fade-in 0.5s ease forwards;
}
.luxury-notif.ln-anim-fade.ln-exit {
    animation: ln-fade-out 0.4s ease forwards;
}

@keyframes ln-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ln-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Scale */
.luxury-notif.ln-anim-scale.ln-enter {
    animation: ln-scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.luxury-notif.ln-anim-scale.ln-exit {
    animation: ln-scale-out 0.3s ease forwards;
}

@keyframes ln-scale-in {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ln-scale-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.7);
    }
}

/* Bounce */
.luxury-notif.ln-anim-bounce.ln-enter {
    animation: ln-bounce-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}
.luxury-notif.ln-anim-bounce.ln-exit {
    animation: ln-fade-out 0.4s ease forwards;
}

@keyframes ln-bounce-in {
    0%   { opacity: 0; transform: translateY(-40px) scale(0.8); }
    50%  { opacity: 1; transform: translateY(8px) scale(1.02); }
    70%  { transform: translateY(-4px) scale(0.99); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* =============== تم‌های آماده =============== */

/* تم طلایی - پیش‌فرض */
.luxury-notif.ln-theme-gold {
    --ln-primary: #D4AF37;
    --ln-bg: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* تم نقره‌ای */
.luxury-notif.ln-theme-silver {
    --ln-primary: #C0C0C0;
    background: linear-gradient(135deg, #2C2C3A 0%, #1E1E2E 100%);
    border: 1px solid rgba(192, 192, 192, 0.3);
}

/* تم زمردی */
.luxury-notif.ln-theme-emerald {
    --ln-primary: #50C878;
    background: linear-gradient(135deg, #0D2818 0%, #1A3C2A 100%);
    border: 1px solid rgba(80, 200, 120, 0.3);
}

/* تم یاقتی */
.luxury-notif.ln-theme-ruby {
    --ln-primary: #E0115F;
    background: linear-gradient(135deg, #2A0A14 0%, #3E1020 100%);
    border: 1px solid rgba(224, 17, 95, 0.3);
}

/* تم سفیری */
.luxury-notif.ln-theme-sapphire {
    --ln-primary: #0F52BA;
    background: linear-gradient(135deg, #0A1428 0%, #1A2E4E 100%);
    border: 1px solid rgba(15, 82, 186, 0.4);
}

/* تم تاریک مینیمال */
.luxury-notif.ln-theme-dark {
    --ln-primary: #BB86FC;
    background: #121212;
    border: 1px solid rgba(187, 134, 252, 0.2);
}

/* تم سفارشی - رنگ‌های کاربر */
.luxury-notif.ln-theme-custom {
    background: var(--ln-bg);
    border: 1px solid color-mix(in srgb, var(--ln-primary) 30%, transparent);
}

/* =============== ریسپانسیو =============== */

@media (max-width: 480px) {
    .luxury-notif-container {
        left: 12px !important;
        right: 12px !important;
        transform: none !important;
    }
    .luxury-notif-container.ln-pos-top-center,
    .luxury-notif-container.ln-pos-bottom-center {
        left: 12px !important;
        right: 12px !important;
        transform: none !important;
    }
    .luxury-notif-container.ln-pos-center-screen {
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }
    .luxury-notif {
        width: auto !important;
        max-width: 100%;
        padding: 16px 18px 18px;
    }
    .luxury-notif .ln-icon {
        width: 40px;
        height: 40px;
    }
    .luxury-notif .ln-icon-emoji {
        font-size: 22px;
    }
    .luxury-notif .ln-title {
        font-size: 14px;
    }
    .luxury-notif .ln-message {
        font-size: 13px;
    }
}

/* =============== درخشش طلایی اضافی =============== */

.luxury-notif.ln-theme-gold .ln-icon,
.luxury-notif.ln-theme-gold {
    animation: ln-glow-pulse 3s ease-in-out infinite;
}

@keyframes ln-glow-pulse {
    0%, 100% { box-shadow: var(--ln-shadow), 0 0 0 transparent; }
    50%      { box-shadow: var(--ln-shadow), var(--ln-glow); }
}

/* جلوگیری از تداخل با تم‌های قالب */
.luxury-notif *,
.luxury-notif *::before,
.luxury-notif *::after {
    box-sizing: border-box;
}

.luxury-notif-container * {
    margin: 0;
    padding: 0;
}

/* ریست فونت */
.luxury-notif .ln-title,
.luxury-notif .ln-message {
    font-family: inherit;
    font-weight: inherit;
    text-transform: none;
    letter-spacing: normal;
    text-shadow: none;
    background: none;
}
