/* Chuông thông báo sự kiện (PC) — dùng chung cho frontpage và trang cá nhân */
.event-bell {
    position: fixed;
    left: 20px;
    bottom: 24px;
    z-index: 1040;
    flex-direction: column;
    align-items: center;
}

.event-bell__btn {
    position: relative;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #cc3333;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(204, 51, 51, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-bell__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(204, 51, 51, 0.28);
}

/* Vòng sóng lan toả quanh chuông để gây chú ý */
.event-bell__btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(204, 51, 51, 0.45);
    animation: event-bell-ripple 1.8s ease-out infinite;
    z-index: -1;
}

@keyframes event-bell-ripple {
    0%   { transform: scale(1);   opacity: 0.7; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Chuông lắc liên tục, có quãng nghỉ giữa các hồi */
.event-bell__icon {
    transform-origin: top center;
    animation: event-bell-ring 2.5s ease-in-out infinite;
}

@keyframes event-bell-ring {
    0%, 55%, 100%            { transform: rotate(0); }
    5%, 15%, 25%, 35%, 45%   { transform: rotate(13deg); }
    10%, 20%, 30%, 40%, 50%  { transform: rotate(-13deg); }
}

/* Khi panel đang mở thì ngừng lắc và ngừng sóng */
.event-bell.is-open .event-bell__icon { animation: none; }
.event-bell.is-open .event-bell__btn::after { animation: none; opacity: 0; }

.event-bell__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #d41e25;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

.event-bell__caption {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cc3333;
}

/* Panel danh sách sự kiện: mở lên trên vì chuông nằm ở cuối thanh bên */
.event-bell__panel {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 0;
    width: 280px;
    max-width: 86vw;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1045;
}

.event-bell.is-open .event-bell__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.event-bell__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-weight: 700;
    color: #fff;
    background: var(--bg-btn-gradient);
}

.event-bell__close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.9;
}

.event-bell__close:hover { opacity: 1; }

.event-bell__body {
    max-height: 320px;
    overflow-y: auto;
    padding: 10px;
}

.event-bell__item {
    border: 1px solid #f0d9d9;
    border-radius: 14px;
    background: #fff8f1;
    padding: 12px;
    text-align: center;
}

.event-bell__item + .event-bell__item { margin-top: 10px; }

.event-bell__item-title {
    font-weight: 700;
    color: #cc3333;
    margin-bottom: 4px;
}

.event-bell__item-time {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 10px;
}

.event-bell__join {
    display: inline-block;
    padding: 7px 22px;
    border-radius: 30px;
    background: var(--bg-btn-gradient);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.event-bell__join:hover,
.event-bell__join:focus {
    filter: brightness(1.05);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none;
}

