/* ============================================================================
   Firebase Notification Popup Styles
   Custom styling for in-app notification popups using SweetAlert2
   ============================================================================ */

/* Notification Popup Styles */

/* Custom notification popup container */
.signing-notification-popup {
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
}

/* Permission prompt specific styles */
.notification-permission-popup {
    border-radius: 16px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.notification-permission-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #2c3e50;
}

.notification-permission-content {
    text-align: left;
    line-height: 1.6;
}

.notification-permission-content ul {
    margin: 15px 0;
}

.notification-permission-content li {
    padding: 8px 0;
    font-size: 15px;
    color: #34495e;
}

.notification-permission-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Document card in popup */

/* Sign Now Button */
.btn-sign-now {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 14px 35px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    border-radius: 30px !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.btn-sign-now:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5) !important;
}

/* Later Button */
.btn-later {
    background: #6c757d !important;
    border: none !important;
    padding: 14px 35px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border-radius: 30px !important;
    transition: all 0.3s ease !important;
}

.btn-later:hover {
    background: #5a6268 !important;
    transform: translateY(-2px) !important;
}

/* Pulse Animation for Sign Button */
.pulse-button {
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

/* Icon Pulse Animation */
@keyframes popupPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Fade Out Up Animation */
@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
}

/* Notification Toast Styles (for alertify fallback) */
.alertify-notifier .ajs-message.ajs-notification-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    padding: 16px 20px;
    font-weight: 500;
}

/* Browser Notification Badge */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 0px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Notification Sound Toggle Button */
.sound-toggle-btn {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-toggle-btn:hover {
    background: #667eea;
    color: white;
}

.sound-toggle-btn.active {
    background: #667eea;
    color: white;
}

.sound-toggle-btn i {
    margin-right: 6px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .signing-notification-popup {
        max-width: 90% !important;
        margin: 10px !important;
    }
    
    .btn-sign-now,
    .btn-later {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .signing-notification-popup {
        background: #1e1e1e !important;
        color: #ffffff !important;
    }
    
    .signing-notification-popup .swal2-title {
        color: #667eea !important;
    }
    
    .signing-notification-popup p {
        color: #e0e0e0 !important;
    }
}

/* Loading Animation for Service Worker */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.notification-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

/* Permission Request Popup */
.permission-request-popup {
    border-radius: 16px !important;
    padding: 24px !important;
}

.permission-request-popup .swal2-icon {
    margin: 20px auto !important;
}

.permission-request-popup .swal2-title {
    color: #667eea !important;
    font-size: 24px !important;
    font-weight: 700 !important;
}

.permission-request-popup .swal2-html-container {
    font-size: 15px !important;
    color: #6c757d !important;
    line-height: 1.6 !important;
}
