/* Push Notification Styles */

/* Foreground Toast */
.push-notification-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
    max-width: 380px;
    width: calc(100% - 2rem);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 197, 63, 0.2);
    animation: pushToastSlideIn 0.3s ease-out;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

.push-notification-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8bc53f, #6ba52f);
}

.push-notification-toast:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.push-notification-toast.push-toast-exit {
    opacity: 0;
    transform: translateX(100%);
}

.push-toast-content {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 12px;
}

.push-toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8bc53f22, #8bc53f11);
    border-radius: 8px;
    color: #8bc53f;
}

.push-toast-text {
    flex: 1;
    min-width: 0;
}

.push-toast-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 2px;
}

.push-toast-text span {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.push-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
}

.push-toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

@keyframes pushToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* Prompt Banner */
.push-prompt-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99998;
    max-width: 460px;
    width: calc(100% - 2rem);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: pushBannerSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.push-prompt-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8bc53f, #f6921e);
}

.push-prompt-banner.push-prompt-exit {
    animation: pushBannerSlideDown 0.3s ease-in forwards;
}

.push-prompt-content {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.push-prompt-icon {
    font-size: 28px;
    line-height: 1;
}

.push-prompt-text {
    flex: 1;
    min-width: 200px;
}

.push-prompt-text strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.push-prompt-text span {
    display: block;
    font-size: 13px;
    color: #666;
}

.push-prompt-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.push-prompt-accept {
    flex: 1;
    padding: 10px 20px;
    background: #8bc53f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.push-prompt-accept:hover {
    background: #7ab535;
}

.push-prompt-dismiss {
    flex: 1;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.push-prompt-dismiss:hover {
    background: #e8e8e8;
}

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

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

/* Mobile responsive */
@media (max-width: 480px) {
    .push-notification-toast {
        top: 0.5rem;
        right: 0.5rem;
        width: calc(100% - 1rem);
    }

    .push-prompt-banner {
        bottom: 1rem;
        border-radius: 12px;
    }

    .push-prompt-content {
        padding: 16px;
    }
}
