/* ==========================================================================
   Notification Pop-Up System - SSO System Colors (Variation 2)
   Uses exact colors from Jordan Customs unified-theme.css
   ========================================================================== */

/* ===== OVERLAY (Modal background) ===== */
.notification-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999999 !important;
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== NOTIFICATION CARD ===== */
.notification-popup {
    background: white;
    border-radius: 8px;
    border: 2px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 32px 28px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: slideInFromTop 0.4s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ICON (Government badge style) ===== */
.notification-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* ===== TEXT CONTENT ===== */
.notification-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--gray-800, #1f2937);
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--gray-600, #4b5563);
    line-height: 1.6;
    margin-bottom: 18px;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.notification-error-id {
    font-size: 0.8rem;
    color: var(--gray-500, #6b7280);
    margin-bottom: 18px;
    font-family: 'Courier New', monospace;
    background: var(--gray-100, #f3f4f6);
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

.notification-error-id strong {
    color: var(--gray-700, #374151);
    user-select: all;
}

/* ===== BUTTON (Government style) ===== */
.notification-button {
    padding: 12px 28px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    min-height: 44px;
    color: white;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.notification-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.notification-button:focus {
    outline: 2px solid var(--secondary-blue, #3b82f6);
    outline-offset: 2px;
}

/* ===== SUCCESS TYPE ===== */
.notification-success {
    border-color: var(--success, #059669);
    background: linear-gradient(to bottom, white, #f0fdf4);
}

.notification-success .notification-icon {
    background: var(--success, #059669);
}

.notification-success .notification-button {
    background: var(--success, #059669);
    border-color: var(--success, #059669);
}

.notification-success .notification-button:hover {
    background: #047857;
}

/* ===== ERROR TYPE ===== */
.notification-error {
    border-color: var(--danger, #dc2626);
    background: linear-gradient(to bottom, white, #fef2f2);
}

.notification-error .notification-icon {
    background: var(--danger, #dc2626);
}

.notification-error .notification-button {
    background: var(--danger, #dc2626);
    border-color: var(--danger, #dc2626);
}

.notification-error .notification-button:hover {
    background: #b91c1c;
}

/* ===== WARNING TYPE ===== */
.notification-warning {
    border-color: var(--warning, #d97706);
    background: linear-gradient(to bottom, white, var(--light-gold, #fef3c7));
}

.notification-warning .notification-icon {
    background: var(--warning, #d97706);
}

.notification-warning .notification-button {
    background: var(--warning, #d97706);
    border-color: var(--warning, #d97706);
}

.notification-warning .notification-button:hover {
    background: #b45309;
}

/* ===== INFO TYPE ===== */
.notification-info {
    border-color: var(--info, #0891b2);
    background: linear-gradient(to bottom, white, #cffafe);
}

.notification-info .notification-icon {
    background: var(--info, #0891b2);
}

.notification-info .notification-button {
    background: var(--info, #0891b2);
    border-color: var(--info, #0891b2);
}

.notification-info .notification-button:hover {
    background: #0e7490;
}

/* ===== DEBUG PANEL ===== */
.notification-debug-panel {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 4px solid var(--danger, #dc2626);
    text-align: right;
    font-size: 0.85rem;
    direction: rtl;
}

.notification-debug-panel h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 0.9rem;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.notification-debug-panel table {
    width: 100%;
    border-collapse: collapse;
}

.notification-debug-panel td {
    padding: 5px;
    vertical-align: top;
}

.notification-debug-panel td:first-child {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    width: 140px;
}

.notification-debug-panel td:last-child {
    color: #666;
    word-break: break-word;
}

.notification-debug-panel pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.75rem;
    margin-top: 5px;
    direction: ltr;
    text-align: left;
}

.toggle-debug,
.copy-debug {
    margin-top: 10px;
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s ease;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.toggle-debug:hover,
.copy-debug:hover {
    background: #5a6268;
}

.copy-debug {
    background: #28a745;
    margin-right: 8px;
}

.copy-debug:hover {
    background: #218838;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .notification-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .notification-popup {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        margin: 0;
        animation: slideInFromBottom 0.4s ease-out;
    }

    @keyframes slideInFromBottom {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .notification-icon {
        width: 56px;
        height: 56px;
    }

    .notification-icon svg {
        width: 28px;
        height: 28px;
    }

    .notification-title {
        font-size: 1.1rem;
    }

    .notification-message {
        font-size: 0.85rem;
    }

    .notification-button {
        width: 100%;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .notification-overlay,
    .notification-popup {
        animation-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.notification-popup:focus {
    outline: 2px solid var(--secondary-blue, #3b82f6);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification-popup {
        border-width: 3px;
    }

    .notification-button {
        border-width: 3px;
    }
}

/* ===== ANIMATION FOR DISMISSING ===== */
.notification-popup.dismissing {
    animation: fadeOut 0.3s ease-in;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}
