/* Professional Notification System (PNS) Styles */

/* Toasts */
.pns-toast {
    width: 320px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    overflow: hidden;
    position: relative;
    animation: pns-toast-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
}

@keyframes pns-toast-in {
    from { opacity: 0; transform: translateX(-50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.pns-toast-inner {
    display: flex;
    padding: 1rem;
    align-items: center;
    gap: 1rem;
}

.pns-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pns-type-info .pns-toast-icon { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.pns-type-success .pns-toast-icon { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.pns-type-warning .pns-toast-icon { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.pns-type-error .pns-toast-icon { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.pns-toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.15rem;
}

.pns-toast-msg {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}

.pns-toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.pns-toast-close:hover { color: #fff; }

.pns-toast-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Modals */
.pns-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: pns-fade-in 0.3s ease;
}

@keyframes pns-fade-in { from { opacity: 0; } to { opacity: 1; } }

.pns-modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    animation: pns-modal-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pns-modal-in {
    from { opacity: 0; transform: scale(0.8) translateY(40px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.pns-modal-header {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pns-modal-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 2;
}

.pns-type-info { background: linear-gradient(135deg, #3b82f6, #2dd4bf); }
.pns-type-info .pns-modal-icon-circle { color: #3b82f6; }

.pns-type-success { background: linear-gradient(135deg, #10b981, #34d399); }
.pns-type-success .pns-modal-icon-circle { color: #10b981; }

.pns-type-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.pns-type-warning .pns-modal-icon-circle { color: #f59e0b; }

.pns-type-error { background: linear-gradient(135deg, #ef4444, #f87171); }
.pns-type-error .pns-modal-icon-circle { color: #ef4444; }

.pns-modal-body {
    padding: 2rem;
    text-align: center;
}

.pns-modal-body h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.pns-modal-body p {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.pns-modal-footer {
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pns-btn {
    padding: 1rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.pns-btn-primary {
    background: #fff;
    color: #000;
}

.pns-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

.pns-btn-secondary {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.pns-btn-secondary:hover { background: rgba(255,255,255,0.1); }

.pns-modal-dismiss {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

.pns-modal-dismiss:hover { color: #fff; }

/* Priorities */
.pns-priority-critical { border: 2px solid #ef4444; }
.pns-priority-critical .pns-modal-icon-circle { animation: pns-pulse 1.5s infinite; }

@keyframes pns-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* RTL Support (Cairo Font inherited from app) */
[dir="rtl"] .pns-toast { animation: pns-toast-in-rtl 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); left: auto; right: 2rem; }
@keyframes pns-toast-in-rtl {
    from { opacity: 0; transform: translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

[dir="rtl"] #pns-toast-container { left: auto; right: 2rem; }
[dir="rtl"] .pns-toast-close { right: auto; left: 0.5rem; }
