/**
 * NEET Push - Popup Template Styles
 *
 * 5 popup templates:
 *   1. default   — Clean Green Card
 *   2. minimal   — Ultra Minimal (underline-link CTA)
 *   3. modern    — Glassmorphism Card with shimmer
 *   4. urgent    — Red Alert Banner (top-of-page)
 *   5. festive   — Celebration / Confetti Style
 */

/* ==========================================================================
   SHARED BASE ANIMATIONS
   ========================================================================== */

/* Default / Minimal / Modern / Festive — slide-up fade-in from bottom-right */
.neet-push-tpl-default.neet-push-popup-enter,
.neet-push-tpl-minimal.neet-push-popup-enter,
.neet-push-tpl-modern.neet-push-popup-enter,
.neet-push-tpl-festive.neet-push-popup-enter {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
}

.neet-push-tpl-default.neet-push-popup-visible,
.neet-push-tpl-minimal.neet-push-popup-visible,
.neet-push-tpl-modern.neet-push-popup-visible,
.neet-push-tpl-festive.neet-push-popup-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.neet-push-tpl-default.neet-push-popup-exit,
.neet-push-tpl-minimal.neet-push-popup-exit,
.neet-push-tpl-modern.neet-push-popup-exit,
.neet-push-tpl-festive.neet-push-popup-exit {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ==========================================================================
   TEMPLATE 1: DEFAULT — Clean Green Card
   ========================================================================== */

.neet-push-tpl-default {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    width: 380px;
    max-width: calc(100vw - 32px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.neet-push-tpl-default-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   TEMPLATE 2: MINIMAL — Ultra Minimal
   ========================================================================== */

.neet-push-tpl-minimal {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    max-width: 340px;
    width: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.neet-push-tpl-minimal-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.neet-push-tpl-minimal-text {
    margin: 0 0 10px;
    font-size: 13px;
    color: #475569;
    line-height: 1.55;
}

.neet-push-tpl-minimal-cta {
    display: inline;
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    text-decoration: none;
    border-bottom: 1px solid #10b981;
    transition: color 0.15s, border-color 0.15s;
    cursor: pointer;
    background: none;
    padding: 0;
}

.neet-push-tpl-minimal-cta:hover,
.neet-push-tpl-minimal-cta:focus {
    color: #059669;
    border-color: #059669;
}

.neet-push-tpl-minimal-dismiss {
    display: inline-block;
    margin-left: 12px;
    font-size: 12px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    vertical-align: baseline;
    transition: color 0.15s;
}

.neet-push-tpl-minimal-dismiss:hover {
    color: #64748b;
}

/* ==========================================================================
   TEMPLATE 3: MODERN — Glassmorphism Card
   ========================================================================== */

.neet-push-tpl-modern {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    width: 380px;
    max-width: calc(100vw - 32px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.neet-push-tpl-modern-content {
    position: relative;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 32px 28px 28px;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    /* Gradient border via pseudo-element */
    overflow: hidden;
}

.neet-push-tpl-modern-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #10b981, #14b8a6, #10b981);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.neet-push-tpl-modern-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.15s;
    z-index: 1;
}

.neet-push-tpl-modern-close:hover {
    color: #475569;
}

.neet-push-tpl-modern-icon {
    margin-bottom: 14px;
}

.neet-push-tpl-modern-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.neet-push-tpl-modern-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 22px;
    line-height: 1.55;
}

/* Animated gradient CTA button */
.neet-push-tpl-modern-cta {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 13px 28px;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.neet-push-tpl-modern-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
}

.neet-push-tpl-modern-cta-text {
    position: relative;
    z-index: 1;
}

/* Shimmer overlay */
.neet-push-tpl-modern-cta-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%
    );
    animation: neet-push-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes neet-push-shimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

.neet-push-tpl-modern-dismiss {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s;
}

.neet-push-tpl-modern-dismiss:hover {
    color: #475569;
}

/* ==========================================================================
   TEMPLATE 4: URGENT — Red Alert Banner (Top of Page)
   ========================================================================== */

.neet-push-tpl-urgent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.neet-push-tpl-urgent-content {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    padding: 14px 20px;
    color: #fff;
    box-shadow: 0 4px 24px rgba(239, 68, 68, 0.35);
    animation: neet-push-urgent-slide-down 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.neet-push-tpl-urgent.neet-push-popup-enter .neet-push-tpl-urgent-content {
    animation: none;
}

.neet-push-tpl-urgent.neet-push-popup-visible .neet-push-tpl-urgent-content {
    animation: neet-push-urgent-slide-down 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes neet-push-urgent-slide-down {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

.neet-push-tpl-urgent-exit .neet-push-tpl-urgent-content {
    animation: neet-push-urgent-slide-up 0.35s ease forwards;
}

@keyframes neet-push-urgent-slide-up {
    from { transform: translateY(0); }
    to   { transform: translateY(-100%); }
}

.neet-push-tpl-urgent-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.neet-push-tpl-urgent-pulse {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    animation: neet-push-urgent-icon-pulse 1.4s ease-in-out infinite;
}

@keyframes neet-push-urgent-icon-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.2); opacity: 0.8; }
}

.neet-push-tpl-urgent-body {
    flex: 1;
    min-width: 0;
}

.neet-push-tpl-urgent-title {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neet-push-tpl-urgent-desc {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.neet-push-tpl-urgent-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.neet-push-tpl-urgent-cta {
    padding: 9px 20px;
    background: #fff;
    color: #ef4444;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.neet-push-tpl-urgent-cta:hover {
    background: #fef2f2;
    transform: translateY(-1px);
}

.neet-push-tpl-urgent-dismiss {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.neet-push-tpl-urgent-dismiss:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   TEMPLATE 5: FESTIVE — Celebration / Confetti Style
   ========================================================================== */

.neet-push-tpl-festive {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    width: 380px;
    max-width: calc(100vw - 32px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.neet-push-tpl-festive-content {
    position: relative;
    border-radius: 20px;
    padding: 32px 28px 28px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    /* CSS-only confetti dots background */
    background-color: #fffbeb;
    background-image:
        radial-gradient(circle, #10b981 1.5px, transparent 1.5px),
        radial-gradient(circle, #f59e0b 1.5px, transparent 1.5px),
        radial-gradient(circle, #ef4444 1.5px, transparent 1.5px),
        radial-gradient(circle, #8b5cf6 1.5px, transparent 1.5px),
        radial-gradient(circle, #06b6d4 1.5px, transparent 1.5px),
        radial-gradient(circle, #ec4899 1.5px, transparent 1.5px);
    background-size:
        24px 24px,
        18px 18px,
        30px 30px,
        22px 22px,
        26px 26px,
        20px 20px;
    background-position:
        3px 5px,
        12px 18px,
        8px 2px,
        20px 14px,
        5px 22px,
        16px 8px;
}

.neet-push-tpl-festive-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 18px;
    color: #78716c;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}

.neet-push-tpl-festive-close:hover {
    background: #fff;
    color: #292524;
}

.neet-push-tpl-festive-title {
    font-size: 22px;
    font-weight: 800;
    color: #1c1917;
    margin: 0 0 8px;
    position: relative;
}

.neet-push-tpl-festive-desc {
    font-size: 14px;
    color: #57534e;
    margin: 0 0 22px;
    line-height: 1.55;
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Green CTA with bounce animation */
.neet-push-tpl-festive-cta {
    display: block;
    width: 100%;
    position: relative;
    padding: 13px 28px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: neet-push-festive-bounce 2s ease-in-out infinite;
}

.neet-push-tpl-festive-cta:hover {
    animation: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

@keyframes neet-push-festive-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.neet-push-tpl-festive-dismiss {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: none;
    border: none;
    color: #a8a29e;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s;
}

.neet-push-tpl-festive-dismiss:hover {
    color: #57534e;
}

/* ==========================================================================
   RESPONSIVE — Templates
   ========================================================================== */

@media (max-width: 640px) {
    .neet-push-tpl-default,
    .neet-push-tpl-modern,
    .neet-push-tpl-festive {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .neet-push-tpl-minimal {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    /* Urgent banner adapts for small screens */
    .neet-push-tpl-urgent-content {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }

    .neet-push-tpl-urgent-desc {
        white-space: normal;
    }

    .neet-push-tpl-urgent-body {
        flex-basis: calc(100% - 56px);
    }

    .neet-push-tpl-urgent-actions {
        flex-basis: 100%;
        justify-content: flex-end;
    }
}
