/**
 * Push Notifications UI Styles
 * iOS-optimized notification messages
 */

/* Notification Messages */
.push-notification-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100000;
    animation: slideDown 0.4s ease-out;
    min-width: 300px;
    text-align: center;
}

.push-notification-message span {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.push-notification-message.success {
    border: 1px solid rgba(76, 175, 80, 0.3);
    background: rgba(76, 175, 80, 0.1);
}

.push-notification-message.success span {
    color: #2e7d32;
}

.push-notification-message.error {
    border: 1px solid rgba(244, 67, 54, 0.3);
    background: rgba(244, 67, 54, 0.1);
}

.push-notification-message.error span {
    color: #c62828;
}

/* Waiting Message with Spinner */
.push-notification-message.waiting {
    border: 1px solid rgba(255, 152, 0, 0.3);
    background: rgba(255, 152, 0, 0.1);
    min-width: 400px;
}

.push-notification-message.waiting .message-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.push-notification-message.waiting span {
    color: #e65100;
    flex: 1;
    text-align: left;
}

/* Spinner Animation */
.push-notification-message .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 152, 0, 0.3);
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Close Button */
.push-notification-message .close-btn {
    background: transparent;
    border: none;
    color: #e65100;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.push-notification-message .close-btn:hover {
    opacity: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* iOS-specific styles */
@supports (-webkit-touch-callout: none) {
    .push-notification-message {
        -webkit-backdrop-filter: blur(20px);
    }
}

/* Dark theme support */
:root:not(.theme-light) {
    .push-notification-message {
        background: rgba(30, 30, 30, 0.95);
    }

    .push-notification-message.waiting {
        background: rgba(255, 152, 0, 0.15);
        border-color: rgba(255, 152, 0, 0.4);
    }

    .push-notification-message.waiting span {
        color: #ff9800;
    }

    .push-notification-message.waiting .close-btn {
        color: #ff9800;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .push-notification-message {
        min-width: 280px;
        padding: 14px 20px;
    }

    .push-notification-message span {
        font-size: 14px;
    }

    .push-notification-message.waiting {
        min-width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
    }

    .push-notification-message.waiting span {
        font-size: 13px;
    }
}