/* ==========================================================================
   D2C Real-Time Notifications Component Styles
   ========================================================================== */

.d2c-notif-dropdown {
    position: relative;
    display: inline-block;
}

.d2c-notif-btn {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.d2c-notif-btn:hover, .d2c-notif-btn:focus {
    background-color: #f1f5f9;
    color: var(--primary-color, #1b3825);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Badge Counter */
.d2c-notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
    line-height: 1;
    animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* Dropdown Menu Container */
.d2c-notif-menu {
    width: 360px;
    max-width: 92vw;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    padding: 0;
    overflow: hidden;
    margin-top: 10px;
    z-index: 1055;
    animation: notifSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notifSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.d2c-notif-header {
    background: #ffffff;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.d2c-notif-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.d2c-notif-mark-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color, #1b3825);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.d2c-notif-mark-all:hover {
    color: #15803d;
    text-decoration: underline;
}

/* Notification List Body */
.d2c-notif-body {
    max-height: 380px;
    overflow-y: auto;
    background: #ffffff;
    scrollbar-width: thin;
}

.d2c-notif-body::-webkit-scrollbar {
    width: 5px;
}
.d2c-notif-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.d2c-notif-footer {
    background: #f8fafc;
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}
.d2c-notif-footer a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-color, #1b3825);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}
.d2c-notif-footer a:hover {
    color: #15803d;
    text-decoration: underline;
}

/* Notification Item */
.d2c-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none !important;
    color: #334155;
    transition: all 0.15s ease;
    cursor: pointer;
    position: relative;
}

.d2c-notif-item:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.d2c-notif-item.unread {
    background-color: #f0fdf4;
}
.d2c-notif-item.unread:hover {
    background-color: #e8f5e9;
}

/* Icon Box */
.d2c-notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.d2c-notif-icon.bg-success { background: #dcfce7 !important; color: #15803d !important; }
.d2c-notif-icon.bg-primary { background: #dbeafe !important; color: #1d4ed8 !important; }
.d2c-notif-icon.bg-warning { background: #fef3c7 !important; color: #b45309 !important; }
.d2c-notif-icon.bg-danger  { background: #fee2e2 !important; color: #b91c1c !important; }
.d2c-notif-icon.bg-info    { background: #e0f2fe !important; color: #0369a1 !important; }

/* Item Texts */
.d2c-notif-content {
    flex: 1;
    min-width: 0;
}

.d2c-notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
    line-height: 1.3;
}

.d2c-notif-item-msg {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.d2c-notif-item-time {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* Unread Indicator Dot */
.d2c-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    position: absolute;
    top: 16px;
    right: 14px;
}

/* Empty State */
.d2c-notif-empty {
    padding: 36px 20px;
    text-align: center;
    color: #94a3b8;
}
.d2c-notif-empty i {
    font-size: 34px;
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
}

/* Live Toast Notification Banner */
.d2c-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: calc(100vw - 32px);
    pointer-events: none;
}

.d2c-toast-item {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.25s ease;
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
