:root {
    --hdv2-notif-panel-bg: #ffffff;
    --hdv2-notif-panel-fg: #18181b;
    --hdv2-notif-panel-muted: #71717a;
    --hdv2-notif-panel-border: #ececef;
    --hdv2-notif-panel-accent: #f4f4f5;
    --hdv2-notif-panel-shadow: 0 10px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
}

:root[data-hdv2-theme="dark"] {
    --hdv2-notif-panel-bg: #1c1e24;
    --hdv2-notif-panel-fg: #f4f4f5;
    --hdv2-notif-panel-muted: #a1a1aa;
    --hdv2-notif-panel-border: #2e323b;
    --hdv2-notif-panel-accent: #272a31;
    --hdv2-notif-panel-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* hdv2-notifications-open: sadece UI state (more chevron, tooltip); scroll kilidi yok */

.hdv2-cah-topbar__notifications-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    margin-right: 0.35rem;
    overflow: visible;
}

.hdv2-cah-topbar__notifications {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--hdv2-cah-border, #e4e4e7);
    border-radius: 0.55rem;
    background: var(--hdv2-cah-card, #fff);
    color: var(--hdv2-cah-fg, #3f3f46);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications {
    border-color: var(--hdv2-cah-border, #2e323b);
    background: var(--hdv2-cah-card, #1c1e24);
    color: var(--hdv2-cah-fg, #e4e4e7);
}

.hdv2-cah-topbar__notifications:hover,
.hdv2-cah-topbar__notifications[aria-expanded="true"] {
    background: var(--hdv2-cah-accent, #f4f4f5);
    border-color: #d4d4d8;
    color: #18181b;
}

.hdv2-cah-topbar__notifications svg {
    width: 1.05rem;
    height: 1.05rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hdv2-cah-topbar__notifications-badge {
    position: absolute;
    top: -0.3rem;
    right: -0.3rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.22rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
    box-shadow: 0 0 0 2px var(--hdv2-cah-card, #fff);
}

.hdv2-cah-topbar__notifications-badge[hidden] {
    display: none !important;
}

.hdv2-cah-topbar__notifications-panel {
    z-index: 1300;
    width: min(22.5rem, calc(100vw - 1rem));
    border: 1px solid var(--hdv2-cah-border, var(--hdv2-notif-panel-border));
    border-radius: 0.9rem;
    background: var(--hdv2-cah-card, var(--hdv2-notif-panel-bg));
    color: var(--hdv2-cah-fg, var(--hdv2-notif-panel-fg));
    box-shadow: var(--hdv2-notif-panel-shadow);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.2s;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.hdv2-cah-topbar__notifications-panel.is-floating {
    z-index: 10050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: none;
}

.hdv2-cah-topbar__notifications-panel.is-floating::before {
    display: none;
}

.hdv2-cah-topbar__notifications-panel.is-floating .hdv2-cah-topbar__alerts {
    overflow-x: hidden;
    overflow-y: hidden;
    flex: 1 1 auto;
    min-height: 0;
    max-height: var(--hdv2-notif-list-max, none);
    scrollbar-width: none;
}

.hdv2-cah-topbar__notifications-panel.is-floating .hdv2-cah-topbar__alerts.is-scrollable {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c4c4c8 #f1f1f3;
}

.hdv2-cah-topbar__notifications-panel.is-floating .hdv2-cah-topbar__alerts::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.hdv2-cah-topbar__notifications-panel.is-floating .hdv2-cah-topbar__alerts.is-scrollable::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.hdv2-cah-topbar__notifications-panel.is-floating .hdv2-cah-topbar__alerts.is-scrollable::-webkit-scrollbar-track {
    background: #f1f1f3;
    border-radius: 999px;
    margin: 4px 0;
}

.hdv2-cah-topbar__notifications-panel.is-floating .hdv2-cah-topbar__alerts.is-scrollable::-webkit-scrollbar-thumb {
    background: #c4c4c8;
    border-radius: 999px;
    border: 2px solid #f1f1f3;
}

.hdv2-cah-topbar__notifications-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hdv2-cah-topbar__notifications-panel.is-closing {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
}

.hdv2-cah-topbar__notifications-panel[hidden] {
    display: none !important;
}

.hdv2-cah-topbar__notifications-panel.is-animating[hidden] {
    display: flex !important;
}

.hdv2-cah-topbar__notifications-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f1f3;
    background: var(--hdv2-cah-card, var(--hdv2-notif-panel-bg));
}

.hdv2-cah-topbar__notifications-head-main {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.hdv2-cah-topbar__notifications-title {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #52525b;
}

.hdv2-cah-topbar__notifications-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.2rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #f4f4f5;
    color: #a1a1aa;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.hdv2-cah-topbar__alerts {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--hdv2-cah-card, var(--hdv2-notif-panel-bg));
}

.hdv2-cah-topbar__alert-item {
    margin: 0;
    border-bottom: 1px solid #f4f4f5;
    opacity: 0;
    transform: translateY(4px);
}

.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item:nth-child(1) { transition-delay: 0.02s; }
.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item:nth-child(2) { transition-delay: 0.04s; }
.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item:nth-child(3) { transition-delay: 0.06s; }
.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item:nth-child(4) { transition-delay: 0.08s; }
.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item:nth-child(5) { transition-delay: 0.1s; }
.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item:nth-child(6) { transition-delay: 0.12s; }
.hdv2-cah-topbar__notifications-panel.is-open .hdv2-cah-topbar__alert-item:nth-child(n+7) { transition-delay: 0.14s; }

.hdv2-cah-topbar__alert-item:last-child {
    border-bottom: 0;
}

.hdv2-cah-topbar__alert-link {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}

.hdv2-cah-topbar__alert-link:hover {
    background: #fafafa;
}

.hdv2-cah-topbar__alert-link:focus-visible {
    outline: 2px solid #a1a1aa;
    outline-offset: -2px;
}

.hdv2-cah-topbar__alert-icon {
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
}

.hdv2-cah-topbar__alert-icon svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hdv2-cah-topbar__alert-icon svg circle,
.hdv2-cah-topbar__alert-icon svg path,
.hdv2-cah-topbar__alert-icon svg line,
.hdv2-cah-topbar__alert-icon svg polyline {
    fill: none;
}

.hdv2-cah-topbar__alert-icon--info {
    color: #2563eb;
    background: #eff6ff;
}

.hdv2-cah-topbar__alert-icon--success {
    color: #16a34a;
    background: #f0fdf4;
}

.hdv2-cah-topbar__alert-icon--warning {
    color: #d97706;
    background: #fffbeb;
}

.hdv2-cah-topbar__alert-icon--danger {
    color: #e11d48;
    background: #fff1f2;
}

.hdv2-cah-topbar__alert-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hdv2-cah-topbar__alert-title-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.hdv2-cah-topbar__alert-title {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #27272a;
    line-height: 1.3;
}

.hdv2-cah-topbar__alert-dot {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: #60a5fa;
    flex-shrink: 0;
}

.hdv2-cah-topbar__alert-desc {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    color: #a1a1aa;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hdv2-cah-topbar__alert-empty {
    padding: 1.35rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--hdv2-notif-panel-muted);
}

.hdv2-cah-topbar__notifications-foot {
    flex-shrink: 0;
    border-top: 1px solid #f1f1f3;
    background: var(--hdv2-cah-card, var(--hdv2-notif-panel-bg));
}

.hdv2-cah-topbar__notifications-foot-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #71717a;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.hdv2-cah-topbar__notifications-foot-link:hover {
    background: #fafafa;
    color: #18181b;
}

.hdv2-cah-topbar__notifications-foot-link svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.hdv2-cah-topbar__alert-chevron,
.hdv2-cah-topbar__alert-label,
.hdv2-cah-topbar__alert-promo-em {
    display: none;
}

.hdv2-header__actions .hdv2-cah-topbar__notifications-wrap {
    margin-right: 0.35rem;
}

.hdv2-header__actions .hdv2-cah-topbar__notifications {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.hdv2-header__actions .hdv2-cah-topbar__notifications-panel,
.hdv2-cah-topbar__notifications-panel.is-floating {
    width: min(22.5rem, calc(100vw - 1rem));
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications:hover,
:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications[aria-expanded="true"] {
    background: var(--hdv2-cah-accent, #272a31);
    border-color: #3f3f46;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications-count {
    background: #272a31;
    color: #a1a1aa;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-link:hover,
:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications-foot-link:hover {
    background: #272a31;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications-title {
    color: #d4d4d8;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications-head,
:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications-foot,
:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-item {
    border-color: #2a2d33;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-title {
    color: #e4e4e7;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-desc {
    color: #71717a;
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-icon--info {
    background: rgba(37, 99, 235, 0.15);
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-icon--success {
    background: rgba(22, 163, 74, 0.15);
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-icon--warning {
    background: rgba(217, 119, 6, 0.15);
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__alert-icon--danger {
    background: rgba(225, 29, 72, 0.15);
}

:root[data-hdv2-theme="dark"] .hdv2-cah-topbar__notifications-foot-link {
    color: #d4d4d8;
}

:root[data-hdv2-theme="dark"] .hdv2-header__actions .hdv2-cah-topbar__notifications {
    border-color: #2e323b;
    background: #1a1b1f;
    color: #d4d4d8;
}

:root[data-hdv2-theme="dark"] .hdv2-header__actions .hdv2-cah-topbar__notifications-badge {
    box-shadow: 0 0 0 2px #1a1b1f;
}
