/**
 * Frontend CSS for Web Push Notifications
 */

/* Subscription Prompt */
.wpn-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e5e9;
    animation: wpn-slide-in 0.3s ease-out;
}

.wpn-prompt-content {
    padding: 20px;
}

.wpn-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.wpn-prompt-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.wpn-prompt-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    line-height: 1;
}

.wpn-prompt-close:hover {
    color: #666;
}

.wpn-prompt-body {
    margin-bottom: 20px;
}

.wpn-prompt-body p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.wpn-prompt-footer {
    display: flex;
    gap: 10px;
}

.wpn-prompt-footer .button {
    flex: 1;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wpn-prompt-footer .button-primary {
    background: #0073aa;
    color: #fff;
    border: 1px solid #0073aa;
}

.wpn-prompt-footer .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.wpn-prompt-footer .button:not(.button-primary) {
    background: #f7f7f7;
    color: #666;
    border: 1px solid #ddd;
}

.wpn-prompt-footer .button:not(.button-primary):hover {
    background: #eee;
    color: #333;
}

/* Subscribe/Unsubscribe Buttons */
.wpn-subscribe-btn,
.wpn-unsubscribe-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    line-height: 1.4;
}

.wpn-subscribe-btn {
    background: #0073aa;
    color: #fff;
    border: 1px solid #0073aa;
}

.wpn-subscribe-btn:hover {
    background: #005a87;
    border-color: #005a87;
    color: #fff;
}

.wpn-subscribe-btn:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.wpn-unsubscribe-btn {
    background: #f7f7f7;
    color: #666;
    border: 1px solid #ddd;
}

.wpn-unsubscribe-btn:hover {
    background: #eee;
    color: #333;
}

.wpn-unsubscribe-btn:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Preferences Page */
.wpn-preferences {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.wpn-preferences h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.wpn-status-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.wpn-status-section p {
    margin: 0;
    font-size: 14px;
}

.wpn-status-subscribed {
    color: #28a745;
    font-weight: 600;
}

.wpn-status-unsubscribed {
    color: #dc3545;
    font-weight: 600;
}

.wpn-actions {
    margin-bottom: 30px;
}

.wpn-actions .button {
    margin-bottom: 10px;
}

.wpn-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

.wpn-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.wpn-info h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.wpn-info ul {
    margin: 0;
    padding-left: 20px;
}

.wpn-info li {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.wpn-info li:last-child {
    margin-bottom: 0;
}

/* Messages */
.wpn-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 12px 20px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    max-width: 300px;
    animation: wpn-slide-in 0.3s ease-out;
}

.wpn-message-success {
    background: #28a745;
}

.wpn-message-error {
    background: #dc3545;
}

.wpn-message-info {
    background: #17a2b8;
}

/* Animations */
@keyframes wpn-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpn-prompt {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .wpn-prompt-content {
        padding: 15px;
    }
    
    .wpn-prompt-header h3 {
        font-size: 15px;
    }
    
    .wpn-prompt-footer {
        flex-direction: column;
    }
    
    .wpn-prompt-footer .button {
        width: 100%;
    }
    
    .wpn-message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .wpn-prompt {
        bottom: 5px;
        right: 5px;
        left: 5px;
    }
    
    .wpn-prompt-content {
        padding: 12px;
    }
    
    .wpn-prompt-header h3 {
        font-size: 14px;
    }
    
    .wpn-prompt-body p {
        font-size: 13px;
    }
    
    .wpn-prompt-footer .button {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wpn-prompt {
        border: 2px solid #000;
    }
    
    .wpn-prompt-header h3 {
        color: #000;
    }
    
    .wpn-prompt-body p {
        color: #000;
    }
    
    .wpn-subscribe-btn {
        background: #000;
        color: #fff;
        border-color: #000;
    }
    
    .wpn-unsubscribe-btn {
        background: #fff;
        color: #000;
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wpn-prompt,
    .wpn-message {
        animation: none;
    }
    
    .wpn-prompt-footer .button,
    .wpn-subscribe-btn,
    .wpn-unsubscribe-btn {
        transition: none;
    }
} 