/* Notification center of the artist portal (top bar bell). */
.artist-notify [hidden] {
    display: none !important;
}

.artist-notify .topbar-bell-badge {
    top: -0.2rem;
    right: -0.15rem;
    background: #ff5d4d;
    color: #fff;
    box-shadow: 0 0 0 2px #0b0b0d;
    pointer-events: none;
}

.artist-notify .topbar-bell-badge.is-calm {
    background: #d7e83c;
    color: #15150f;
}

/* New notification / message: the bell rings 4 times, the envelope flies through its circle 4 times
   and the counter pops with an expanding halo. */
@media (prefers-reduced-motion: no-preference) {
    .artist-notify.is-alerting .topbar-bell-icon {
        transform-origin: 50% 12%;
        animation: artist-notify-ring 1.1s ease-in-out 4;
    }

    .artist-notify.is-alerting .topbar-bell-badge {
        --notify-halo: rgba(255, 93, 77, 0.7);
        --notify-halo-end: rgba(255, 93, 77, 0);
        animation:
            artist-notify-badge-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
            artist-notify-badge-halo 1.1s ease-out 0.3s 4;
    }

    .artist-notify.is-alerting .topbar-bell-badge.is-calm {
        --notify-halo: rgba(215, 232, 60, 0.7);
        --notify-halo-end: rgba(215, 232, 60, 0);
    }

    .artist-msg.is-alerting .topbar-bell-icon {
        animation: none;
    }

    .artist-msg.is-alerting .topbar-bell-icon svg {
        visibility: hidden;
    }

    .artist-msg.is-alerting .artist-msg__flight {
        display: grid;
    }

    .artist-msg.is-alerting .artist-msg__flight svg {
        animation: artist-msg-fly 1.5s linear 4;
    }

    .artist-msg.is-alerting .topbar-bell-badge {
        animation:
            artist-notify-badge-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
            artist-notify-badge-halo 1.5s ease-out 0.3s 4;
    }
}

/* Envelope layer that flies across the button circle (shown only while alerting). */
.artist-msg__flight {
    display: none;
    position: absolute;
    inset: 0;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    pointer-events: none;
}

.artist-msg__flight svg {
    width: 1.45rem;
    height: 1.45rem;
}

@keyframes artist-msg-fly {
    0% { transform: translateX(-2.4rem) rotate(-6deg); animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
    27% { transform: translateX(0) rotate(0); }
    60% { transform: translateX(0) rotate(0); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4); }
    87%, 100% { transform: translateX(2.4rem) rotate(6deg); }
}

@keyframes artist-notify-ring {
    0%, 60%, 100% { transform: rotate(0); }
    8% { transform: rotate(16deg); }
    16% { transform: rotate(-14deg); }
    24% { transform: rotate(11deg); }
    32% { transform: rotate(-9deg); }
    40% { transform: rotate(6deg); }
    48% { transform: rotate(-3deg); }
}

@keyframes artist-notify-badge-pop {
    0% { transform: scale(0.2); }
    60% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

@keyframes artist-notify-badge-halo {
    0% { box-shadow: 0 0 0 2px #0b0b0d, 0 0 0 2px var(--notify-halo); }
    100% { box-shadow: 0 0 0 2px #0b0b0d, 0 0 0 0.7rem var(--notify-halo-end); }
}

.artist-notify__menu {
    --notify-ink: #f6f6f1;
    --notify-muted: rgba(246, 246, 241, 0.62);
    --notify-line: rgba(255, 255, 255, 0.1);
    --notify-accent: #d7e83c;
    width: min(26.5rem, calc(100vw - 1.5rem));
    max-width: none;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    background: #111315;
    color: var(--notify-ink);
    box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.55);
}

.artist-notify__menu.show {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 5.5rem);
    max-height: calc(100dvh - 5.5rem);
}

/* Caret that ties the menu to the bell that opens it. */
.artist-notify__menu::before {
    content: "";
    position: absolute;
    top: -0.43rem;
    right: var(--menu-caret-right, 0.95rem);
    width: 0.8rem;
    height: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    background: #111315;
    transform: rotate(45deg);
}

.artist-notify > button.show {
    border-color: var(--notify-accent, #d7e83c);
    background: rgba(215, 232, 60, 0.12);
    color: #d7e83c;
}

.artist-notify__panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-radius: inherit;
}

.artist-notify__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem 0.7rem;
}

.artist-notify__heading {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    flex: 1 1 auto;
}

.artist-notify__heading strong {
    font-size: 1rem;
    font-weight: 800;
    color: var(--notify-ink);
}

.artist-notify__summary {
    font-size: 0.78rem;
    color: var(--notify-muted);
}

.artist-notify__tools {
    display: flex;
    gap: 0.35rem;
}

.artist-notify__tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--notify-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--notify-ink);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

/* El enlace a la página de mensajes es un <a>: sin subrayado ni siquiera al pasar el ratón o enfocarlo. */
a.artist-notify__tool,
a.artist-notify__tool:hover,
a.artist-notify__tool:focus,
a.artist-notify__tool:focus-visible,
a.artist-notify__tool:active,
a.artist-notify__tool:visited,
a.artist-notify__tool i {
    text-decoration: none;
}

.artist-notify__tool:hover:not(:disabled),
.artist-notify__tool:focus-visible {
    border-color: var(--notify-accent);
    background: rgba(215, 232, 60, 0.12);
    color: var(--notify-accent);
}

.artist-notify__tool:disabled {
    opacity: 0.4;
    cursor: default;
}

.artist-notify__scope {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem 0.6rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(215, 232, 60, 0.28);
    border-radius: 0.65rem;
    background: rgba(215, 232, 60, 0.08);
    color: var(--notify-accent);
    font-size: 0.76rem;
    line-height: 1.3;
}

/* The strip is built by artist_notifications.js around the filters: side gutters hold the scroll arrows. */
.artist-notify__filter-strip {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0 1rem;
    margin-bottom: 0.7rem;
}

.artist-notify__filter-strip.is-scrollable {
    padding: 0 2.35rem;
}

.artist-notify__filters {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
}

/* Only when the chips are not inside a strip (before the script wraps them) keep the old spacing. */
.artist-notify__panel > .artist-notify__filters {
    flex: 0 0 auto;
    margin: 0 1rem 0.7rem;
}

.artist-notify__menu .artist-notify__filters,
html.jj-autohide-scrollbars .artist-notify__menu .artist-notify__filters {
    scrollbar-width: none !important;
}

.artist-notify__filters::-webkit-scrollbar {
    display: none;
}

.artist-notify__filter-arrow {
    position: absolute;
    z-index: 1;
    top: 50%;
    display: grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    margin-top: -0.85rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--notify-accent);
    font-size: 1.05rem;
    line-height: 1;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.artist-notify__filter-arrow:hover {
    border-color: rgba(215, 232, 60, 0.5);
    background: rgba(215, 232, 60, 0.12);
}

.artist-notify__filter-arrow--start {
    left: 0.55rem;
}

.artist-notify__filter-arrow--end {
    right: 0.55rem;
}

.artist-notify__chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.35rem;
    height: 2rem;
    padding: 0 0.7rem;
    border: 1px solid var(--notify-line);
    border-radius: 999px;
    background: transparent;
    color: var(--notify-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.artist-notify__chip b {
    min-width: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--notify-ink);
    font-size: 0.68rem;
    line-height: 1.2rem;
    text-align: center;
}

.artist-notify__chip:hover {
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--notify-ink);
}

.artist-notify__chip.is-active {
    border-color: var(--notify-accent);
    background: var(--notify-accent);
    color: #15150f;
}

.artist-notify__chip.is-active b {
    background: rgba(21, 21, 15, 0.16);
    color: #15150f;
}

.artist-notify__list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0.2rem 0.6rem 0.6rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    border-top: 1px solid var(--notify-line);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.artist-notify__item {
    --notify-tone: #6cb6ff;
    position: relative;
    display: flex;
    align-items: stretch;
    margin-top: 0.35rem;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    transition: background-color 0.16s ease, border-color 0.16s ease, opacity 0.2s ease, transform 0.2s ease;
}

.artist-notify__item.is-danger {
    --notify-tone: #ff6b5e;
}

.artist-notify__item.is-warning {
    --notify-tone: #ffb454;
}

.artist-notify__item.is-success {
    --notify-tone: #d7e83c;
}

.artist-notify__item.is-info {
    --notify-tone: #6cb6ff;
}

.artist-notify__item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.artist-notify__item.is-unread {
    border-color: color-mix(in srgb, var(--notify-tone) 32%, transparent);
    background: color-mix(in srgb, var(--notify-tone) 9%, transparent);
}

.artist-notify__item.is-leaving {
    opacity: 0;
    transform: translateX(1rem);
}

.artist-notify__link {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.7rem 2.2rem 0.7rem 0.7rem;
    border-radius: inherit;
    color: inherit;
    text-decoration: none;
}

.artist-notify__link:focus-visible {
    outline: 2px solid var(--notify-accent);
    outline-offset: -2px;
}

.artist-notify__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--notify-tone, var(--notify-accent)) 16%, transparent);
    color: var(--notify-tone, var(--notify-accent));
    font-size: 1rem;
}

.artist-notify__icon--small {
    --notify-tone: var(--notify-accent);
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.9rem;
}

.artist-notify__body {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.artist-notify__title {
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--notify-ink);
}

.artist-notify__item:not(.is-unread) .artist-notify__title {
    font-weight: 700;
    color: rgba(246, 246, 241, 0.82);
}

.artist-notify__copy {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--notify-muted);
    overflow-wrap: anywhere;
}

.artist-notify__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.65rem;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: rgba(246, 246, 241, 0.45);
}

.artist-notify__category i {
    margin-right: 0.2rem;
}

.artist-notify__action {
    margin-left: auto;
    font-weight: 700;
    color: var(--notify-tone);
}

.artist-notify__dot {
    align-self: start;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: transparent;
}

.artist-notify__item.is-unread .artist-notify__dot {
    background: var(--notify-tone);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--notify-tone) 25%, transparent);
}

.artist-notify__dismiss {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(246, 246, 241, 0.45);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.artist-notify__item:hover .artist-notify__dismiss,
.artist-notify__dismiss:focus-visible {
    opacity: 1;
}

.artist-notify__dismiss:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--notify-ink);
}

@media (hover: none) {
    .artist-notify__dismiss {
        opacity: 1;
    }
}

.artist-notify__empty {
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--notify-line);
    text-align: center;
}

.artist-notify__empty i {
    font-size: 2rem;
    color: var(--notify-accent);
}

.artist-notify__empty strong {
    font-size: 0.95rem;
}

.artist-notify__empty span {
    font-size: 0.8rem;
    color: var(--notify-muted);
}

.artist-notify__footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--notify-line);
}

.artist-notify__link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--notify-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.artist-notify__link-button:hover {
    color: var(--notify-accent);
}

.artist-notify__settings {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0.2rem 0.6rem 0.8rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    border-top: 1px solid var(--notify-line);
}

.artist-notify__setting {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.4rem;
    border-bottom: 1px solid var(--notify-line);
}

.artist-notify__setting:last-child {
    border-bottom: 0;
}

.artist-notify__setting-label {
    flex: 1 1 auto;
    font-size: 0.88rem;
    font-weight: 700;
}

.artist-notify__locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    color: var(--notify-muted);
}

/* The shared switch styles live in the site settings stylesheet, which is not loaded on every page. */
.artist-notify .artist-site-switch {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 2.6rem;
    height: 1.5rem;
    margin: 0;
    cursor: pointer;
}

.artist-notify .artist-site-switch input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.artist-notify .artist-site-switch__track {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.18s ease, border-color 0.18s ease;
    pointer-events: none;
}

.artist-notify .artist-site-switch__track::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.2rem;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #f7f7ef;
    transform: translateY(-50%);
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.artist-notify .artist-site-switch input:checked + .artist-site-switch__track {
    border-color: #d7e83c;
    background: rgba(215, 232, 60, 0.85);
}

.artist-notify .artist-site-switch input:checked + .artist-site-switch__track::after {
    background: #15150f;
    transform: translate(1.1rem, -50%);
}

.artist-notify .artist-site-switch input:focus-visible + .artist-site-switch__track {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .artist-notify__item,
    .artist-notify__chip,
    .artist-notify__tool {
        transition: none;
    }
}

.artist-notify__close {
    display: none;
}

/* Same breakpoint and behaviour as the artist profile menu: full screen with a close button. */
@media (max-width: 767px) {
    .artist-private-shell .artist-notify__menu.show {
        position: fixed !important;
        inset: 0 1px 1px 0 !important;
        display: flex !important;
        box-sizing: border-box;
        width: auto;
        max-width: none;
        height: calc(100dvh - 1px);
        max-height: none;
        margin: 0 !important;
        border-radius: 0;
        transform: none !important;
    }

    .artist-private-shell .artist-notify__menu.show::before {
        display: none;
    }

    .artist-private-shell .artist-notify__close {
        position: absolute;
        top: 0.85rem;
        right: 0.85rem;
        z-index: 4;
        display: inline-grid;
        place-items: center;
        width: 2.35rem;
        height: 2.35rem;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
        font-size: 1rem;
    }

    .artist-private-shell .artist-notify__header {
        padding-right: 3.9rem;
    }
}
