/* Notification Wrapper & Badge */
.notification-wrapper {
    position: relative;
    cursor: pointer;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-wrapper .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 0.65rem;
    padding: 0.35em 0.5em;
    border: 2px solid #1a1a1a;
}

/* Bell Animation */
.bell-shake {
    animation: bell-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes bell-shake {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0); }
}

/* Offcanvas Styles Redesign */
.casino-offcanvas {
    background: #0E141B; /* Image background */
    color: #fff;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    width: 400px !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
}

.casino-offcanvas .offcanvas-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    /*justify-content: left;  Center the whole content */
}

.casino-offcanvas .offcanvas-title {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.messages-offcanvas {
    background: var(--tertiary_900); /* Image background */
    color: #fff;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    width: 400px !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
}

.header-bell-container {
    width: 40px;
    height: 40px;
    background: var(--tertiary_800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px; /* Added spacing instead of negative margin */
}

.header-bell-container i {
    color: var(--tertiary_500);
}

.casino-offcanvas .btn-close {
    color: var(--tertiary_500);
}

/* Card Style Notification Items */
.notification-container {
    padding: 15px;
}

.notification-item {
    background: var(--tertiary_800);
    border: 1px solid var(--tertiary_700);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    overflow: hidden; /* Prevent spill */
}

.notification-item:hover {
    background-color: #212B37;
    transform: translateY(-2px);
}

.notification-item.unread {
    background-color: var(--tertiary_800);
    border: 1px solid var(--tertiary_700);
}

.notification-icon-container {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
}

.freespin-game-img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover;
    border-radius: 12px;
    border: none;
}

.notification-content {
    flex-grow: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--tertiary_100);
}

.notification-text {
    font-size: 0.85rem;
    color: var(--tertiary_500);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--tertiary_700);
    font-weight: 500;
}

/* Badge Redesign */
.notification-wrapper .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    border: 2px solid #0E141B;
}

/* Empty State */
.bell-slash-container {
    padding: 60px 20px;
    text-align: center;
    color: #64748B;
}

.bell-slash-container i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #fff;
}

/* ──────── HTMX Toast Notifications (OOB swap) ──────── */
.notification-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.notification-toast-container > * {
    pointer-events: auto;
}

.notification-toast {
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    animation: toast-slide-in 0.3s ease-out;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
