/**
 * Web Push Notifications - Frontend Styles
 */

/* Subscribe Button */
.wpn-subscribe-container {
    margin: 2em 0;
    text-align: center;
}

.wpn-subscribe-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.8em 1.5em;
    font-size: 1em;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.wpn-subscribe-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.wpn-subscribe-button:active {
    transform: translateY(0);
}

.wpn-subscribe-button.wpn-subscribed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.wpn-subscribe-button.wpn-subscribed:hover {
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.5);
}

.wpn-bell-icon {
    font-size: 1.2em;
    animation: wpn-ring 2s ease-in-out infinite;
}

.wpn-subscribed .wpn-bell-icon {
    animation: none;
}

@keyframes wpn-ring {
    0%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(0); }
}

/* iOS Notice */
.wpn-ios-notice {
    margin-top: 1em;
    padding: 1em;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 0.9em;
}

/* Exit Intent Popup */
.wpn-exit-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    animation: wpn-fade-in 0.3s ease forwards;
}

@keyframes wpn-fade-in {
    to { opacity: 1; }
}

.wpn-exit-popup {
    position: relative;
    background: #fff;
    padding: 2.5em 2em;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: wpn-popup-in 0.3s ease forwards;
}

@keyframes wpn-popup-in {
    to { transform: scale(1); }
}

.wpn-exit-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.wpn-exit-popup-close:hover {
    color: #333;
}

.wpn-exit-popup-icon {
    font-size: 3em;
    margin-bottom: 0.3em;
    animation: wpn-ring 2s ease-in-out infinite;
}

.wpn-exit-popup-title {
    margin: 0 0 0.5em;
    font-size: 1.5em;
    color: #333;
}

.wpn-exit-popup-text {
    margin: 0 0 1.5em;
    color: #666;
    line-height: 1.5;
}

.wpn-exit-popup-button {
    display: inline-block;
    padding: 1em 2em;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.wpn-exit-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.wpn-exit-popup-dismiss {
    margin-top: 1em;
    margin-bottom: 0;
}

.wpn-exit-popup-dismiss a {
    color: #999;
    text-decoration: none;
    font-size: 0.9em;
}

.wpn-exit-popup-dismiss a:hover {
    color: #666;
    text-decoration: underline;
}

#wpn-exit-ios-notice {
    margin-top: 1em;
    padding: 0.8em;
    background: #fff3cd;
    border-radius: 8px;
    color: #856404;
    font-size: 0.85em;
}

/* Toast Messages */
.wpn-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1em 2em;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95em;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999999;
    opacity: 0;
    transition: all 0.3s ease;
}

.wpn-toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.wpn-toast-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.wpn-toast-error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

/* Shake Animation */
@keyframes wpn-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wpn-exit-popup {
        background: #2d2d2d;
    }
    
    .wpn-exit-popup-title {
        color: #fff;
    }
    
    .wpn-exit-popup-text {
        color: #ccc;
    }
    
    .wpn-exit-popup-close {
        color: #888;
    }
    
    .wpn-exit-popup-close:hover {
        color: #fff;
    }
    
    .wpn-exit-popup-dismiss a {
        color: #888;
    }
    
    .wpn-exit-popup-dismiss a:hover {
        color: #bbb;
    }
    
    #wpn-exit-ios-notice,
    .wpn-ios-notice {
        background: #3d3520;
        border-color: #6b5900;
        color: #e0c36a;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .wpn-exit-popup {
        padding: 2em 1.5em;
        margin: 15px;
        width: calc(100% - 30px);
    }
    
    .wpn-exit-popup-title {
        font-size: 1.3em;
    }
    
    .wpn-exit-popup-button {
        width: 100%;
        padding: 0.9em 1.5em;
    }
    
    .wpn-subscribe-button {
        width: 100%;
        justify-content: center;
    }
}
