/* HNNP news notification widget — loaded outside the /ban-tin/ page. */
.hnnp-news-notis {
    align-items: flex-end;
    bottom: 4.75rem;
    display: flex;
    left: 0.75rem;
    position: fixed;
    transition: bottom 0.22s ease;
    z-index: 1001;
}

html.hnnp-sticky-product-active .hnnp-news-notis {
    bottom: calc(var(--hnnp-sticky-product-height, 80px) + 1.5rem);
}

.hnnp-news-notis.is-open {
    height: 10rem;
    width: 10rem;
}

.hnnp-news-notis:not(.is-open) {
    height: 2.5rem;
    pointer-events: none;
    width: 2.5rem;
}

.hnnp-news-notis:not(.is-open) .hnnp-news-notis-toggle {
    pointer-events: auto;
}

.hnnp-news-notis:not(.is-open) .hnnp-news-notis-icon {
    transform: rotate(90deg) translate(0.15rem, 0.05rem);
}

.hnnp-news-notis-toggle {
    align-items: center !important;
    appearance: none !important;
    background: #000000 !important;
    background-image: none !important;
    border: 0.15rem solid #5f5f5f !important;
    border-radius: 0.4rem !important;
    box-shadow: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    height: 2.5rem !important;
    justify-content: center !important;
    padding: 0 !important;
    position: relative;
    width: 2.5rem !important;
}

.hnnp-news-notis-toggle:hover,
.hnnp-news-notis-toggle:focus-visible {
    background: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
}

.hnnp-news-notis-toggle:focus-visible {
    outline: 2px solid #0062ff;
    outline-offset: 3px;
}

.hnnp-news-notis-icon {
    display: inline-flex;
    height: auto;
    position: relative;
    transform-origin: 50% 56%;
    transition: transform 0.35s cubic-bezier(.2, .8, .2, 1);
    width: 1.15rem;
}

.hnnp-news-notis-speaker {
    display: block;
    height: auto;
    position: relative;
    width: 1.15rem;
    z-index: 2;
}

.hnnp-news-notis-number {
    align-items: center;
    background: #4574f7;
    border-radius: 100rem;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.55rem;
    font-weight: 700;
    height: 0.9rem;
    justify-content: center;
    line-height: 1;
    min-width: 0.9rem;
    padding: 0;
    position: absolute;
    right: -0.4rem;
    top: -0.4rem;
}

.hnnp-news-notis-ping {
    background: #22c55e;
    border: 0;
    border-radius: 999px;
    height: 0.35rem;
    left: 0.4rem;
    position: absolute;
    top: 0.7rem;
    width: 0.35rem;
}

.hnnp-news-notis-list {
    bottom: 3.6rem;
    display: flex;
    flex-direction: column;
    max-height: min(21rem, calc(100vh - 4.5rem));
    max-width: 12.25rem;
    min-width: 12.25rem;
    opacity: 0;
    overflow-y: auto;
    pointer-events: none;
    position: absolute;
    transform: translateX(-120%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
}

.hnnp-news-notis.is-open .hnnp-news-notis-list {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.hnnp-news-notis.is-previewing .hnnp-news-notis-item {
    display: none;
}

.hnnp-news-notis.is-previewing .hnnp-news-notis-item.is-preview-active {
    animation: hnnp-news-preview-in 0.25s ease both;
    display: flex;
}

.hnnp-news-notis-item {
    align-items: center;
    background: rgba(58, 58, 58, 0.8);
    border-radius: 0.4rem;
    box-shadow: none;
    color: #ffffff;
    display: flex;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.4rem;
    text-decoration: none;
}

.hnnp-news-notis-item:hover,
.hnnp-news-notis-item:focus-visible {
    background: rgba(58, 58, 58, 0.8);
    color: #ffffff;
}

.hnnp-news-notis-img {
    border-radius: 0.4rem;
    display: block;
    flex: 0 0 3.2rem;
    height: 2.4rem;
    overflow: hidden;
    width: 3.2rem;
}

.hnnp-news-notis-img img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.hnnp-news-notis-content {
    display: block;
    min-width: 0;
}

.hnnp-news-notis-dot {
    display: none;
}

.hnnp-news-notis-title {
    color: #ffffff;
    display: -webkit-box;
    font-size: 0.6rem;
    font-weight: 400;
    line-height: 1.4;
    overflow: hidden;
    padding-left: 0.7rem;
    position: relative;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.hnnp-news-notis-title::before {
    background: #22c55e;
    border-radius: 100rem;
    content: "";
    height: 0.35rem;
    left: 0;
    position: absolute;
    top: 0.25rem;
    width: 0.35rem;
}

.hnnp-news-notis-item:hover .hnnp-news-notis-title,
.hnnp-news-notis-item:focus-visible .hnnp-news-notis-title {
    color: #f5851e;
}

@keyframes hnnp-news-preview-in {
    from {
        opacity: 0;
        transform: translateY(0.35rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    html.hnnp-sticky-product-active .hnnp-news-notis {
        bottom: calc(var(--hnnp-sticky-product-height, 92px) + 0.75rem);
    }

    .hnnp-news-notis-toggle {
        height: 2.75rem !important;
        width: 2.75rem !important;
    }

    .hnnp-news-notis:not(.is-open) {
        height: 2.75rem;
        width: 2.75rem;
    }
}

@media (max-width: 550px) {
    .hnnp-news-notis.is-open {
        bottom: 4.75rem;
        height: 11rem;
    }

    .hnnp-news-notis:not(.is-open) {
        height: 2.75rem;
        width: 2.75rem;
    }

    .hnnp-news-notis-icon,
    .hnnp-news-notis-speaker {
        width: 1.2rem;
    }

    .hnnp-news-notis-list {
        bottom: 3.75rem;
    }
}
