/* Rabta — professional notification popup screen */

.rabta-notify-screen {
    --notify-accent: #0a75ad;
    --notify-accent-soft: rgba(10, 117, 173, 0.12);
    --notify-accent-glow: rgba(10, 117, 173, 0.25);
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 720px);
    background: var(--tw-card, #fff);
    color: var(--tw-text, #0f172a);
    overflow: hidden;
    border-radius: 0;
}

.rabta-notify-screen--expired {
    --notify-accent: #dc2626;
    --notify-accent-soft: rgba(220, 38, 38, 0.1);
    --notify-accent-glow: rgba(220, 38, 38, 0.22);
}

.rabta-notify-screen--expiring {
    --notify-accent: #d97706;
    --notify-accent-soft: rgba(217, 119, 6, 0.1);
    --notify-accent-glow: rgba(217, 119, 6, 0.22);
}

.rabta-notify-screen--reorder {
    --notify-accent: #2563eb;
    --notify-accent-soft: rgba(37, 99, 235, 0.1);
    --notify-accent-glow: rgba(37, 99, 235, 0.2);
}

/* Hero header */
.rabta-notify-hero {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--notify-accent-soft) 0%, transparent 55%),
                linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-bottom: 1px solid rgba(10, 117, 173, 0.1);
    position: relative;
    flex-shrink: 0;
}

.rabta-notify-hero::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--notify-accent), transparent);
    border-radius: 0 4px 4px 0;
}

.rabta-notify-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--notify-accent-soft);
    color: var(--notify-accent);
    box-shadow: 0 0 0 1px var(--notify-accent-glow), 0 8px 20px var(--notify-accent-glow);
    flex-shrink: 0;
    animation: rabta-notify-pulse 2.8s ease-in-out infinite;
}

.rabta-notify-hero-icon .rabta-icon {
    width: 26px !important;
    height: 26px !important;
}

@keyframes rabta-notify-pulse {
    0%, 100% { box-shadow: 0 0 0 1px var(--notify-accent-glow), 0 8px 20px var(--notify-accent-glow); }
    50% { box-shadow: 0 0 0 3px var(--notify-accent-glow), 0 10px 28px var(--notify-accent-glow); }
}

.rabta-notify-hero-content {
    flex: 1;
    min-width: 0;
}

.rabta-notify-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--notify-accent);
    color: #fff;
    margin-bottom: 0.25rem;
}

.rabta-notify-hero-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--tw-text, #0f172a);
    line-height: 1.3;
}

.rabta-notify-hero-sub {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tw-text-muted, #64748b);
    line-height: 1.4;
}

.rabta-notify-close {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(10, 117, 173, 0.15);
    background: rgba(255, 255, 255, 0.9);
    color: var(--tw-text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.rabta-notify-close:hover {
    background: var(--notify-accent-soft);
    color: var(--notify-accent);
    border-color: var(--notify-accent-glow);
}

/* Summary strip */
.rabta-notify-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: rgba(10, 117, 173, 0.04);
    border-bottom: 1px solid rgba(10, 117, 173, 0.08);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--tw-text-muted, #64748b);
    flex-shrink: 0;
}

.rabta-notify-summary strong {
    color: var(--notify-accent);
    font-weight: 800;
}

/* Table body */
.rabta-notify-body {
    flex: 1;
    overflow: hidden;
    padding: 0.5rem 0.65rem 0.65rem;
    min-height: 0;
}

.rabta-notify-table-wrap {
    height: 100%;
    max-height: min(58vh, 500px);
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(10, 117, 173, 0.12);
    background: var(--tw-card, #fff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.rabta-notify-table-wrap .rabta-table-panel {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.rabta-notify-table-wrap .table {
    margin-bottom: 0 !important;
    background: transparent !important;
}

.rabta-notify-table-wrap .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #334155 !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    padding: 0.45rem 0.5rem !important;
    border-bottom: 2px solid var(--notify-accent) !important;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.rabta-notify-table-wrap .table tbody td {
    padding: 0.38rem 0.5rem !important;
    font-size: 0.76rem !important;
    vertical-align: middle !important;
    border-color: rgba(10, 117, 173, 0.06) !important;
    color: var(--tw-text, #0f172a) !important;
}

.rabta-notify-table-wrap .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(10, 117, 173, 0.025) !important;
}

.rabta-notify-table-wrap .table-hover tbody tr:hover,
.rabta-notify-table-wrap .table tbody tr:hover {
    background: var(--notify-accent-soft) !important;
}

.rabta-notify-table-wrap .badge {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 0.22rem 0.45rem !important;
    border-radius: 6px !important;
    min-width: 2.2rem;
    text-align: center;
}

.rabta-notify-table-wrap .badge-info {
    background: rgba(59, 130, 246, 0.14) !important;
    color: #1d4ed8 !important;
}

.rabta-notify-table-wrap .badge-primary {
    background: rgba(10, 117, 173, 0.14) !important;
    color: #0369a1 !important;
}

.rabta-notify-table-wrap .badge-success {
    background: rgba(16, 185, 129, 0.14) !important;
    color: #047857 !important;
}

.rabta-notify-table-wrap .badge-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #b91c1c !important;
}

.rabta-notify-table-wrap .badge-secondary {
    background: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
}

/* Dark theme */
[data-app-theme="dark"] .rabta-notify-screen {
    background: #121f35;
    color: #f1f5f9;
}

[data-app-theme="dark"] .rabta-notify-hero {
    background: linear-gradient(135deg, var(--notify-accent-soft) 0%, transparent 50%),
                linear-gradient(180deg, #152238 0%, #121f35 100%);
    border-bottom-color: rgba(0, 229, 212, 0.1);
}

[data-app-theme="dark"] .rabta-notify-hero-title {
    color: #f8fafc;
}

[data-app-theme="dark"] .rabta-notify-hero-sub {
    color: #94a3b8;
}

[data-app-theme="dark"] .rabta-notify-close {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(0, 229, 212, 0.15);
    color: #cbd5e1;
}

[data-app-theme="dark"] .rabta-notify-summary {
    background: rgba(15, 35, 58, 0.65);
    border-bottom-color: rgba(0, 229, 212, 0.08);
    color: #94a3b8;
}

[data-app-theme="dark"] .rabta-notify-table-wrap {
    background: #0f1a2e;
    border-color: rgba(0, 229, 212, 0.12);
    box-shadow: inset 0 1px 0 rgba(0, 229, 212, 0.05);
}

[data-app-theme="dark"] .rabta-notify-table-wrap .table thead th {
    background: linear-gradient(180deg, #1a2d4a 0%, #152238 100%) !important;
    color: #e2e8f0 !important;
    border-bottom-color: var(--notify-accent) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

[data-app-theme="dark"] .rabta-notify-table-wrap .table tbody td {
    color: #e2e8f0 !important;
    border-color: rgba(0, 229, 212, 0.06) !important;
}

[data-app-theme="dark"] .rabta-notify-table-wrap .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(15, 35, 58, 0.55) !important;
}

[data-app-theme="dark"] .rabta-notify-table-wrap .badge-info {
    background: rgba(56, 189, 248, 0.18) !important;
    color: #7dd3fc !important;
}

[data-app-theme="dark"] .rabta-notify-table-wrap .badge-primary {
    background: rgba(10, 117, 173, 0.28) !important;
    color: #7dd3fc !important;
}

[data-app-theme="dark"] .rabta-notify-table-wrap .badge-success {
    background: rgba(52, 211, 153, 0.18) !important;
    color: #6ee7b7 !important;
}

[data-app-theme="dark"] .rabta-notify-table-wrap .badge-danger {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #fca5a5 !important;
}

[data-app-theme="dark"] .rabta-notify-table-wrap .badge-secondary {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #cbd5e1 !important;
}
