/* ==========================================================
   LABEL NOTIFICATIONS — TEST UI
   Release: 20260820-01

   Это единственный файл, где надо править внешний вид шторки,
   карточек, настроек, тостов и счётчиков.
   ========================================================== */

:root {
    --ln-font: "Nunito Sans", Arial, sans-serif;

    --ln-bg: #f4f3ef;
    --ln-surface: rgba(255, 255, 255, 0.94);
    --ln-surface-strong: #ffffff;
    --ln-surface-muted: #eeece6;
    --ln-text: #252525;
    --ln-text-soft: #77736b;
    --ln-line: rgba(39, 38, 35, 0.10);
    --ln-shadow: 0 28px 80px rgba(25, 24, 20, 0.18);

    --ln-accent: #302f2c;
    --ln-like: #b86468;
    --ln-mention: #74658a;
    --ln-quote: #7e786b;
    --ln-admin: #9a713d;

    --ln-radius-xl: 28px;
    --ln-radius-lg: 20px;
    --ln-radius-md: 14px;
    --ln-radius-sm: 10px;

    --ln-shade-width: 960px;
    --ln-shade-height: min(600px, calc(100vh - 32px));
}

body.label-notify-open {
    overflow: hidden;
}

/* ---------- внешний триггер в шапке ---------- */

[data-label-notifications-toggle] {
    position: relative;
}

[data-label-notifications-toggle] [data-label-notifications-count],
[data-label-notifications-toggle] > [data-label-notifications-count] {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 18px;
    height: 18px;
    box-sizing: border-box;
    padding: 0 5px;
    border-radius: 20px;
    background: var(--ln-accent);
    color: #fff;
    font: 700 9px/18px var(--ln-font);
    text-align: center;
}

/* ---------- слой / шторка ---------- */

#label-notifications-root {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    font-family: var(--ln-font);
    color: var(--ln-text);
}

.label-notify-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(23, 22, 20, 0.34);
    backdrop-filter: blur(3px);
    transition: opacity .28s ease;
}

.label-notify-shade {
    position: absolute;
    top: 16px;
    left: 50%;
    width: min(var(--ln-shade-width), calc(100vw - 32px));
    height: var(--ln-shade-height);
    max-height: var(--ln-shade-height);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translate(-50%, calc(-100% - 40px));
    opacity: 0;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: var(--ln-radius-xl);
    background: var(--ln-bg);
    box-shadow: var(--ln-shadow);
    transition: transform .34s cubic-bezier(.22,.8,.25,1), opacity .24s ease;
}

#label-notifications-root.is-open {
    pointer-events: auto;
}

#label-notifications-root.is-open .label-notify-backdrop {
    opacity: 1;
}

#label-notifications-root.is-open .label-notify-shade {
    transform: translate(-50%, 0);
    opacity: 1;
}

.label-notify-shade__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 10px;
}

.label-notify-shade__eyebrow,
.label-notify-settings__kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--ln-text-soft);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.label-notify-shade__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-notify-shade__title-row h2 {
    margin: 0;
    font: 700 21px/1.1 var(--ln-font);
}

.label-notify-shade__count {
    min-width: 22px;
    height: 22px;
    box-sizing: border-box;
    padding: 0 7px;
    border-radius: 20px;
    background: var(--ln-accent);
    color: #fff;
    font: 700 9px/22px var(--ln-font);
    text-align: center;
}

.label-notify-shade__header-actions {
    display: flex;
    gap: 6px;
}

.label-notify-icon-button,
.label-notify-text-button,
.label-notify-button,
.label-notify-card__action {
    border: 0;
    font-family: var(--ln-font);
    cursor: pointer;
}

.label-notify-icon-button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--ln-line);
    border-radius: 50%;
    background: rgba(255,255,255,.62);
    color: var(--ln-text);
    font-size: 17px;
    line-height: 30px;
}

.label-notify-shade__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 18px 10px;
    border-bottom: 1px solid var(--ln-line);
}

.label-notify-tabs {
    display: flex;
    padding: 2px;
    border-radius: 999px;
    background: var(--ln-surface-muted);
}

.label-notify-tab {
    min-width: 96px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ln-text-soft);
    font: 700 10px/1 var(--ln-font);
    cursor: pointer;
}

.label-notify-tab.is-active {
    background: var(--ln-surface-strong);
    color: var(--ln-text);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.label-notify-text-button {
    padding: 5px 6px;
    background: transparent;
    color: var(--ln-text-soft);
    font-size: 10px;
    font-weight: 700;
}

.label-notify-shade__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.label-notify-pane {
    display: none;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.label-notify-pane.is-active {
    display: block;
}

.label-notify-list,
.label-notify-settings {
    padding: 12px 18px 16px;
}

/* ---------- уведомления ---------- */

.label-notify-group-title {
    margin: 7px 0 6px;
    color: var(--ln-text-soft);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.label-notify-group-title:first-child {
    margin-top: 0;
}

.label-notify-card {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 7px;
    padding: 10px 12px;
    border: 1px solid var(--ln-line);
    border-radius: var(--ln-radius-lg);
    background: rgba(255,255,255,.66);
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.label-notify-card:hover {
    transform: translateY(-1px);
    background: var(--ln-surface-strong);
}

.label-notify-card.is-unread::before {
    content: "";
    position: absolute;
    top: 11px;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ln-accent);
}

.label-notify-card__icon,
.label-notify-toast__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--ln-surface-muted);
    color: var(--ln-text);
    font-size: 15px;
    font-weight: 800;
}

.label-notify-card--like .label-notify-card__icon,
.label-notify-toast--like .label-notify-toast__icon {
    color: var(--ln-like);
}

.label-notify-card--mention .label-notify-card__icon,
.label-notify-toast--mention .label-notify-toast__icon {
    color: var(--ln-mention);
}

.label-notify-card--quote .label-notify-card__icon,
.label-notify-toast--quote .label-notify-toast__icon {
    color: var(--ln-quote);
}

.label-notify-card--admin .label-notify-card__icon,
.label-notify-toast--admin .label-notify-toast__icon {
    color: var(--ln-admin);
}

.label-notify-card__content {
    min-width: 0;
}

.label-notify-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    padding-right: 16px;
}

.label-notify-card__type {
    color: var(--ln-text-soft);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.label-notify-card__time {
    margin-left: auto;
    color: var(--ln-text-soft);
    font-size: 9px;
}

.label-notify-card__heading {
    padding-right: 16px;
    font-size: 11px;
    line-height: 1.45;
}

.label-notify-card__heading strong {
    font-weight: 800;
}

.label-notify-card__text {
    margin-top: 4px;
    color: var(--ln-text-soft);
    font-size: 10px;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.label-notify-card__actions {
    display: flex;
    gap: 4px;
    margin-top: 5px;
}

.label-notify-card__action {
    padding: 4px 6px;
    border-radius: 7px;
    background: transparent;
    color: var(--ln-text);
    font-size: 9px;
    font-weight: 800;
}

.label-notify-card__action:hover {
    background: var(--ln-surface-muted);
}

.label-notify-card__action--muted {
    color: var(--ln-text-soft);
}

.label-notify-empty {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 44px 16px;
    text-align: center;
    color: var(--ln-text-soft);
}

.label-notify-empty__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--ln-surface-strong);
    color: var(--ln-text);
    font-size: 18px;
}

.label-notify-empty strong {
    color: var(--ln-text);
    font-size: 12px;
}

.label-notify-empty span:not(.label-notify-empty__icon) {
    max-width: 360px;
    font-size: 10px;
    line-height: 1.5;
}

.label-notify-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 0 2px;
}

/* ---------- настройки ---------- */

.label-notify-settings__intro {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: var(--ln-radius-lg);
    background: var(--ln-surface-strong);
}

.label-notify-settings__intro strong {
    font-size: 13px;
}

.label-notify-settings__intro > span:last-child {
    color: var(--ln-text-soft);
    font-size: 10px;
    line-height: 1.5;
}

.label-notify-settings__group {
    overflow: hidden;
    border: 1px solid var(--ln-line);
    border-radius: var(--ln-radius-lg);
    background: rgba(255,255,255,.55);
}

.label-notify-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--ln-line);
    cursor: pointer;
}

.label-notify-setting:last-child {
    border-bottom: 0;
}

.label-notify-setting__copy {
    display: grid;
    gap: 3px;
}

.label-notify-setting__title {
    font-size: 11px;
}

.label-notify-setting__description {
    color: var(--ln-text-soft);
    font-size: 9px;
    line-height: 1.4;
}

.label-notify-switch {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 22px;
}

.label-notify-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.label-notify-switch__visual {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d9d6cf;
    transition: background .18s ease;
}

.label-notify-switch__visual::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.16);
    transition: transform .18s ease;
}

.label-notify-switch input:checked + .label-notify-switch__visual {
    background: var(--ln-accent);
}

.label-notify-switch input:checked + .label-notify-switch__visual::after {
    transform: translateX(16px);
}

.label-notify-volume {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 9px;
    padding: 10px 12px;
    border: 1px solid var(--ln-line);
    border-radius: var(--ln-radius-lg);
    background: rgba(255,255,255,.55);
}

.label-notify-volume__copy {
    display: grid;
    gap: 3px;
}

.label-notify-volume__copy strong {
    font-size: 11px;
}

.label-notify-volume__copy span {
    color: var(--ln-text-soft);
    font-size: 9px;
}

.label-notify-volume__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-notify-volume input[type="range"] {
    width: 160px;
    accent-color: var(--ln-accent);
}

.label-notify-volume__value {
    min-width: 32px;
    color: var(--ln-text-soft);
    font-size: 9px;
    text-align: right;
}

.label-notify-settings__actions {
    display: flex;
    gap: 7px;
    margin-top: 9px;
}

.label-notify-button {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.label-notify-button--primary {
    background: var(--ln-accent);
    color: #fff;
}

.label-notify-button--secondary {
    border: 1px solid var(--ln-line);
    background: var(--ln-surface-strong);
    color: var(--ln-text);
}

.label-notify-button:disabled,
.label-notify-card__action:disabled {
    opacity: .45;
    cursor: default;
}

.label-notify-runtime {
    margin-top: 9px;
    color: var(--ln-text-soft);
    font-size: 8px;
    line-height: 1.5;
}

/* ---------- тосты ---------- */

.label-notify-toasts {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 2147483001;
    display: grid;
    gap: 9px;
    width: 340px;
    max-width: calc(100vw - 44px);
    pointer-events: none;
}

.label-notify-toast {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 24px;
    gap: 11px;
    align-items: start;
    padding: 13px 13px 13px 14px;
    transform: translateY(-8px) scale(.98);
    opacity: 0;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 16px 45px rgba(23,22,20,.16);
    backdrop-filter: blur(18px);
    pointer-events: auto;
    transition: opacity .2s ease, transform .2s ease;
}

.label-notify-toast.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.label-notify-toast.is-leaving {
    transform: translateY(-6px) scale(.98);
    opacity: 0;
}

.label-notify-toast.is-clickable {
    cursor: pointer;
}

.label-notify-toast__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.label-notify-toast__body {
    min-width: 0;
}

.label-notify-toast__heading {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
}

.label-notify-toast__text {
    overflow: hidden;
    color: var(--ln-text-soft);
    font-size: 9px;
    line-height: 1.45;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.label-notify-toast__close {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ln-text-soft);
    font-size: 16px;
    cursor: pointer;
}

/* ---------- небольшая страховка ---------- */

@media (max-width: 760px) {
    :root {
        --ln-shade-height: min(600px, calc(100vh - 16px));
    }

    .label-notify-shade {
        top: 8px;
        width: calc(100vw - 16px);
        border-radius: 22px;
    }

    .label-notify-shade__header,
    .label-notify-shade__toolbar,
    .label-notify-list,
    .label-notify-settings {
        padding-left: 12px;
        padding-right: 12px;
    }

    .label-notify-shade__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .label-notify-volume {
        align-items: flex-start;
        flex-direction: column;
    }

    .label-notify-volume__controls,
    .label-notify-volume input[type="range"] {
        width: 100%;
    }
}
