/* ========================================================
   Notification Permission Prompt – Bottom-right popup
   ======================================================== */

/* Overlay container */
.notif-prompt-overlay {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.notif-prompt-overlay.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Mobile launcher button (hidden by default) */
.notif-prompt-launcher {
    display: none;
}

/* Card */
.notif-prompt-card {
    width: 370px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18),
                0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Top gradient accent bar */
.notif-prompt-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #007EE7 0%, #00C6FB 50%, #005BBB 100%);
}

/* Body */
.notif-prompt-body {
    padding: 20px 22px 18px;
}

/* Icon + title row */
.notif-prompt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

/* Bell icon wrapper */
.notif-prompt-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #007EE7 0%, #00C6FB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Bell animation */
.notif-prompt-icon svg {
    animation: notif-bell-ring 2.5s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes notif-bell-ring {
    0%, 100% { transform: rotate(0); }
    5%       { transform: rotate(14deg); }
    10%      { transform: rotate(-12deg); }
    15%      { transform: rotate(10deg); }
    20%      { transform: rotate(-6deg); }
    25%      { transform: rotate(0); }
}

/* Red notification dot on icon */
.notif-prompt-icon::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FF3B58;
    border: 2px solid #ffffff;
    animation: notif-dot-pulse 2s ease-in-out infinite;
}

@keyframes notif-dot-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}

/* Title */
.notif-prompt-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

/* Description text */
.notif-prompt-text {
    font-size: 13.5px;
    color: #5a5a72;
    line-height: 1.55;
    margin-bottom: 16px;
}

/* Button row */
.notif-prompt-actions {
    display: flex;
    gap: 10px;
}

/* Shared button base */
.notif-prompt-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

/* Primary – Allow */
.notif-prompt-btn-allow {
    background: linear-gradient(135deg, #007EE7 0%, #0065C1 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 126, 231, 0.35);
}

.notif-prompt-btn-allow:hover {
    background: linear-gradient(135deg, #0090FF 0%, #007EE7 100%);
    box-shadow: 0 6px 20px rgba(0, 126, 231, 0.45);
    transform: translateY(-1px);
}

.notif-prompt-btn-allow:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 126, 231, 0.3);
}

/* Secondary – Dismiss */
.notif-prompt-btn-dismiss {
    background: #f0f2f5;
    color: #5a5a72;
}

.notif-prompt-btn-dismiss:hover {
    background: #e4e7ec;
    color: #3a3a4e;
}

.notif-prompt-btn-dismiss:active {
    background: #dcdfe4;
}

/* Close X button */
.notif-prompt-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.notif-prompt-close:hover {
    background: #f0f2f5;
    color: #4b5563;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .notif-prompt-overlay {
        bottom: 12px;
        right: 12px;
        left: 12px;
    }

    .notif-prompt-card {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .notif-prompt-launcher {
        position: fixed;
        left: 0;
        top: 56%;
        transform: translateY(-50%) translateX(-120%);
        z-index: 99998;
        display: flex;
        align-items: flex-start;
        gap: 6px;
        flex-direction: row-reverse;
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    }

    .notif-prompt-launcher.visible {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .notif-prompt-launcher-bell {
        width: 52px;
        height: 56px;
        border: none;
        border-radius: 0 14px 14px 0;
        background: linear-gradient(135deg, #007EE7 0%, #00A2FF 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(0, 126, 231, 0.32);
        cursor: pointer;
    }

    .notif-prompt-launcher-bell svg {
        animation: notif-bell-ring 2.5s ease-in-out infinite;
        transform-origin: top center;
    }

    .notif-prompt-launcher-close {
        width: 20px;
        height: 20px;
        border: none;
        border-radius: 999px;
        background: #ffffff;
        color: #9ca3af;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin-top: -6px;
        margin-left: -8px;
    }

    .notif-prompt-overlay {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translate(-50%, calc(-50% + 30px)) scale(0.96);
    }

    .notif-prompt-overlay.visible {
        transform: translate(-50%, -50%) scale(1);
    }

    .notif-prompt-card {
        width: calc(100vw - 24px);
        max-width: 420px;
    }
}
