/**
 * LeadPush Pro Frontend Styles
 * Styles for opt-in prompts, toasts, and notifications
 */

/* Opt-in Prompt */
.leadpush-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.leadpush-prompt-visible {
    opacity: 1;
    visibility: visible;
}

.leadpush-prompt-closing {
    opacity: 0;
}

.leadpush-prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.leadpush-prompt-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    max-width: 440px;
    width: calc(100% - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: leadpushSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes leadpushSlideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.leadpush-prompt-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.leadpush-prompt-close:hover {
    color: #333;
    transform: scale(1.1);
}

.leadpush-prompt-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.leadpush-prompt-icon svg {
    width: 32px;
    height: 32px;
}

.leadpush-prompt-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 12px;
    line-height: 1.3;
}

.leadpush-prompt-message {
    font-size: 16px;
    color: #4a5568;
    margin: 0 0 28px;
    line-height: 1.6;
}

.leadpush-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leadpush-prompt-accept,
.leadpush-prompt-decline {
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    width: 100%;
}

.leadpush-prompt-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.leadpush-prompt-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.leadpush-prompt-accept:active {
    transform: translateY(0);
}

.leadpush-prompt-decline {
    background: transparent;
    color: #718096;
    border: 1px solid #e2e8f0;
}

.leadpush-prompt-decline:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* Toast Notifications */
.leadpush-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    color: #1a202c;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 999998;
    max-width: 360px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.leadpush-toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.leadpush-toast-success {
    border-left: 4px solid #48bb78;
}

.leadpush-toast-error {
    border-left: 4px solid #f56565;
}

.leadpush-toast-info {
    border-left: 4px solid #4299e1;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .leadpush-prompt-content {
        padding: 32px 24px 24px;
        border-radius: 16px 16px 0 0;
        top: auto;
        bottom: 0;
        transform: translate(-50%, 0);
    }

    @keyframes leadpushSlideUp {
        from {
            transform: translate(-50%, 100%);
            opacity: 0;
        }
        to {
            transform: translate(-50%, 0);
            opacity: 1;
        }
    }

    .leadpush-prompt-title {
        font-size: 20px;
    }

    .leadpush-prompt-message {
        font-size: 14px;
    }

    .leadpush-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .leadpush-prompt-content {
        background: #2d3748;
    }

    .leadpush-prompt-title {
        color: #f7fafc;
    }

    .leadpush-prompt-message {
        color: #cbd5e0;
    }

    .leadpush-prompt-close {
        color: #a0aec0;
    }

    .leadpush-prompt-close:hover {
        color: #f7fafc;
    }

    .leadpush-prompt-decline {
        border-color: #4a5568;
        color: #cbd5e0;
    }

    .leadpush-prompt-decline:hover {
        background: #4a5568;
        color: #f7fafc;
    }

    .leadpush-toast {
        background: #2d3748;
        color: #f7fafc;
    }
}

/* Accessibility */
.leadpush-prompt-accept:focus,
.leadpush-prompt-decline:focus,
.leadpush-prompt-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .leadpush-prompt-content,
    .leadpush-toast {
        animation: none;
        transition: none;
    }
}
