/* Notification Dropdown Modal Styling */

.nnm-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nnm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nnm-card {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 480px;
    max-width: calc(100vw - 32px);
    max-height: min(85vh, 680px);
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.25), 0 0 1px 1px rgba(15, 23, 42, 0.05);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.95);
    transform-origin: center center;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.25s;
    direction: rtl;
    text-align: right;
    font-family: 'TajawalLocal', sans-serif;
}

.nnm-card.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Header */
.nnm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    gap: 12px;
}

.nnm-header-start {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nnm-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 94, 205, 0.08);
    color: #005ecd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nnm-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nnm-unread-pill {
    background: #005ecd;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.nnm-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nnm-action-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    font-family: inherit;
}

.nnm-action-btn:hover {
    background: #f1f5f9;
    color: #005ecd;
}

.nnm-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nnm-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Tabs */
.nnm-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 20px 0;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.nnm-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.nnm-tab-btn:hover {
    color: #005ecd;
}

.nnm-tab-btn.active {
    color: #005ecd;
    border-bottom-color: #005ecd;
}

/* Scroll Body */
.nnm-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 0;
    max-height: 400px;
    min-height: 240px;
}

.nnm-body::-webkit-scrollbar {
    width: 5px;
}

.nnm-body::-webkit-scrollbar-track {
    background: #f8fafc;
}

.nnm-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.nnm-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Notification Items */
.nnm-items-wrapper {
    display: flex;
    flex-direction: column;
}

.nnm-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.15s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.nnm-item:hover {
    background-color: #f8fafc;
}

.nnm-item.unread {
    background-color: #f0f7ff;
}

.nnm-item.unread:hover {
    background-color: #e6f0fd;
}

.nnm-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.nnm-item-icon.type-booking {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.nnm-item-icon.type-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #d1fae5;
}

.nnm-item-icon.type-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.nnm-item-icon.type-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.nnm-item-icon.type-system {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ede9fe;
}

.nnm-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nnm-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nnm-item-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nnm-item-time {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nnm-item-desc {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.nnm-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #005ecd;
    box-shadow: 0 0 0 3px rgba(0, 94, 205, 0.2);
    flex-shrink: 0;
    margin-top: 6px;
    animation: nnm-pulse 2s infinite;
}

@keyframes nnm-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 94, 205, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 94, 205, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 94, 205, 0); }
}

/* Empty State */
.nnm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: #64748b;
}

.nnm-empty-state i {
    font-size: 2.8rem;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.nnm-empty-state h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.nnm-empty-state p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    max-width: 280px;
    line-height: 1.5;
}

/* Loaders */
.nnm-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #005ecd;
    gap: 12px;
    font-size: 0.88rem;
    font-weight: 600;
}

.nnm-loader i {
    font-size: 1.8rem;
}

.nnm-infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    gap: 8px;
    color: #005ecd;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

/* Footer */
.nnm-footer {
    padding: 12px 18px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nnm-footer-btn {
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #00B0F2 0%, #005ECD 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(0, 94, 205, 0.25);
    transition: all 0.2s ease;
}

.nnm-footer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 94, 205, 0.35);
    filter: brightness(1.05);
}

.nnm-footer-btn .arrow-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.nnm-footer-btn:hover .arrow-icon {
    transform: translateX(-4px);
}

/* Responsive for Mobile / Small Screens */
@media (max-width: 767px) {
    .nnm-card {
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        width: calc(100vw - 28px);
        max-width: 440px;
        max-height: 85vh;
        border-radius: 22px;
        border: 1px solid rgba(226, 232, 240, 0.95);
        transform: translate(-50%, -50%) scale(0.95);
        transform-origin: center center;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    }

    .nnm-card.active {
        transform: translate(-50%, -50%) scale(1);
    }

    .nnm-body {
        max-height: calc(85vh - 150px);
    }

    .nnm-header {
        padding: 16px;
    }
}
