/* ==========================================================================
   Kodafriq Premium Floating Toast Notifications & Notification Dropdown System
   ========================================================================== */

/* Toast Container (Fixed Top-Right) */
.kf-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 48px);
}

/* Individual Toast Card */
.kf-toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 32px -4px rgba(9, 30, 66, 0.14), 0 4px 12px -2px rgba(9, 30, 66, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin 0.3s ease;
    position: relative;
}

.kf-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.kf-toast.hide {
    transform: translateX(120%);
    opacity: 0;
    margin-bottom: -60px;
}

.kf-toast-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 18px;
}

.kf-toast-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kf-toast-icon-wrap svg {
    width: 20px;
    height: 20px;
}

.kf-toast-body {
    flex: 1;
    min-width: 0;
}

.kf-toast-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #091e42;
    margin-bottom: 2px;
}

.kf-toast-message {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
    word-break: break-word;
}

.kf-toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 4px;
    flex-shrink: 0;
}

.kf-toast-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.kf-toast-progress {
    height: 3px;
    width: 100%;
    background: #f1f5f9;
    overflow: hidden;
}

.kf-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transition: transform linear;
}

/* Toast Variants */
.kf-toast.toast-success {
    border-left: 4px solid #10b981;
}
.kf-toast.toast-success .kf-toast-icon-wrap {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.kf-toast.toast-success .kf-toast-progress-bar {
    background: #10b981;
}

.kf-toast.toast-error {
    border-left: 4px solid #ef4444;
}
.kf-toast.toast-error .kf-toast-icon-wrap {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.kf-toast.toast-error .kf-toast-progress-bar {
    background: #ef4444;
}

.kf-toast.toast-warning {
    border-left: 4px solid #f59e0b;
}
.kf-toast.toast-warning .kf-toast-icon-wrap {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}
.kf-toast.toast-warning .kf-toast-progress-bar {
    background: #f59e0b;
}

.kf-toast.toast-info {
    border-left: 4px solid #006fe6;
}
.kf-toast.toast-info .kf-toast-icon-wrap {
    background: #eff6ff;
    color: #006fe6;
    border: 1px solid #bfdbfe;
}
.kf-toast.toast-info .kf-toast-progress-bar {
    background: #006fe6;
}

/* ==========================================================================
   Topbar Bell Icon & Interactive Notification Dropdown
   ========================================================================== */
.kf-notif-bell-wrap {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s ease;
    user-select: none;
}

.kf-notif-bell-wrap:hover {
    background: #f1f5f9;
    color: #006fe6;
}

.kf-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    height: 18px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
    animation: kfBadgePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes kfBadgePop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Dropdown Window */
.kf-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 490px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 45px -10px rgba(9, 30, 66, 0.16), 0 0 1px rgba(9, 30, 66, 0.2);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: kfDropdownFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.kf-notif-dropdown.open {
    display: flex;
}

@keyframes kfDropdownFade {
    0% { opacity: 0; transform: translateY(-8px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.kf-notif-drop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

.kf-notif-drop-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #091e42;
}

.kf-notif-pill-count {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.kf-notif-mark-all-btn {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: #006fe6;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.kf-notif-mark-all-btn:hover {
    background: #f0f7ff;
    text-decoration: underline;
}

.kf-notif-drop-body {
    overflow-y: auto;
    max-height: 360px;
    display: flex;
    flex-direction: column;
}

.kf-notif-drop-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s ease;
    position: relative;
}

.kf-notif-drop-item:hover {
    background: #f8fafc;
}

.kf-notif-drop-item.unread {
    background: #f0f7ff;
}

.kf-notif-drop-item.unread:hover {
    background: #e6f2fe;
}

.kf-notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kf-notif-item-icon svg {
    width: 18px;
    height: 18px;
}

.kf-notif-item-icon.certificate {
    background: #fef3c7;
    color: #d97706;
}

.kf-notif-item-icon.assessment {
    background: #ecfdf5;
    color: #059669;
}

.kf-notif-item-icon.application {
    background: #e0f2fe;
    color: #0284c7;
}

.kf-notif-item-icon.score_boost {
    background: #ede9fe;
    color: #7c3aed;
}

.kf-notif-item-icon.system {
    background: #f1f5f9;
    color: #475569;
}

.kf-notif-item-content {
    flex: 1;
    min-width: 0;
}

.kf-notif-item-title {
    font-size: 13px;
    font-weight: 700;
    color: #091e42;
    margin-bottom: 2px;
}

.kf-notif-item-msg {
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
    margin-bottom: 4px;
}

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

.kf-notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #006fe6;
    margin-top: 6px;
    flex-shrink: 0;
}

.kf-notif-empty {
    padding: 36px 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.kf-notif-drop-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    text-align: center;
}

.kf-notif-view-all {
    font-size: 13px;
    font-weight: 600;
    color: #006fe6;
    text-decoration: none;
    transition: color 0.2s;
}

.kf-notif-view-all:hover {
    color: #0052b3;
    text-decoration: underline;
}

/* Responsive Mobile Dropdown */
@media (max-width: 640px) {
    .kf-notif-dropdown {
        position: fixed !important;
        top: 66px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        max-height: 80vh !important;
        border-radius: 16px !important;
    }
}

