/* === NOTIFIKATIONER (HEADER) === */
.notif-bell-wrap{
    position: relative;
    display: inline-flex;
    align-items: center;
}
.notif-bell-wrap.notif-hidden{
    display: none;
}
.notif-bell-btn{
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.notif-bell-btn:not(.mobile-icon-btn){
    background: transparent;
    border: none;
    color: #cbd5f5;
    font-size: var(--font-lg);
    padding: 6px;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}
.notif-bell-btn:not(.mobile-icon-btn):hover{
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.notif-bell-badge{
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: var(--font-xs);
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}
.notif-dropdown{
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    background: #fff;
    color: #0f172a;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0;
    display: none;
    z-index: 2500;
}
.notif-dropdown::before{
    content: "";
    position: absolute;
    top: -8px;
    right: 16px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    transform: rotate(45deg);
}
.notif-dropdown.is-open{
    display: block;
}
.notif-dropdown-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.notif-dropdown-title{
    font-weight: 700;
    font-size: var(--font-sm);
}
.notif-clear-btn{
    padding: 4px 10px;
    font-size: var(--font-xs);
}
.notif-dropdown-list{
    max-height: 320px;
    overflow-y: auto;
    padding: 10px 14px 14px;
}
.notif-item{
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid transparent;
    margin-bottom: 10px;
}
.notif-item:last-child{
    margin-bottom: 0;
}
.notif-item.is-unread{
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.12);
}
.notif-item-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.notif-item-title a{
    color: #0f172a;
    text-decoration: none;
}
.notif-item-title a:hover{
    text-decoration: underline;
}
.notif-item-text{
    margin-top: 4px;
    color: #334155;
    font-size: var(--font-sm);
    line-height: 1.4;
}
.notif-item-meta{
    margin-top: 6px;
    color: #94a3b8;
    font-size: var(--font-xs);
}
.notif-pill{
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: var(--font-xs);
    font-weight: 600;
    flex-shrink: 0;
}
.notif-item.is-unread .notif-pill{
    display: inline-flex;
}
.notif-empty{
    padding: 18px 12px;
    color: #64748b;
    font-size: var(--font-sm);
    text-align: center;
}
@media (max-width: 1200px){
    .notif-dropdown{
        position: fixed;
        top: calc(var(--topbar-height) + var(--safe-top) + 8px);
        left: 12px;
        right: 12px;
        width: auto;
    }
    .notif-dropdown::before{
        right: 42px;
    }
}

/* stop auto-link styling på mobile */
a[x-apple-data-detectors],
a[x-apple-data-detectors=true],
a[href^="tel:"],
a[href^="mailto:"],
a[href^="geo:"],
a[href^="maps:"]{
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   ALERTS
========================================================= */
.alert{
    padding: 12px 14px;
    border-radius: 10px;
    font-size: var(--font-sm);
    margin-bottom: 16px;
    text-align: left;
}
.alert-error{
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.alert-success{
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    position: relative;
}
.alert-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.alert-row .alert-message{
    flex: 1 1 auto;
}
.alert-row .btn{
    margin-left: auto;
}
.alert-row .alert-action{
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
}

/* Toast notifications */
.toast-container{
    position: fixed;
    top: calc(var(--topbar-height, 60px) + var(--safe-top, 0px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 480px;
}
.toast{
    pointer-events: auto;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: var(--font-sm);
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    animation: toastIn .3s ease-out;
    cursor: pointer;
    width: 100%;
    text-align: center;
}
.toast.toast-success{
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.toast.toast-error{
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.toast.toast-out{
    animation: toastOut .3s ease-in forwards;
}
@keyframes toastIn{
    from{ opacity: 0; transform: translateY(-12px); }
    to{ opacity: 1; transform: translateY(0); }
}
@keyframes toastOut{
    from{ opacity: 1; transform: translateY(0); }
    to{ opacity: 0; transform: translateY(-12px); }
}

/* loader */
.redirect-loader{
    height: 4px;
    background: var(--success);
    border-radius: 2px;
    margin-top: 10px;
    animation: redirectProgress 2s linear forwards;
}
@keyframes redirectProgress{
    from{ width: 0; }
    to{ width: 100%; }
}

