.purchase-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(0deg, #ececec 60%, rgb(221, 221, 221) 100%);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    width: 400px;
    height: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    right: 0;
    bottom: 50px;
    z-index: 999;

    /*Animation*/
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.mobile .purchase-notification {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(0deg, #ececec 60%, rgb(221, 221, 221) 100%);
    position: fixed;
}

/* Slide-in animation when shown - target through parent */
#notification.show .purchase-notification,
.purchase-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Alternative: Use keyframes for more control */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.purchase-notification.slide-in {
    animation: slideInFromRight 0.5s ease-out forwards;
    overflow: hidden;
}

/* Shine/sparkle animation */
@keyframes shine {
    0% {
        transform: translateX(-100%) skewX(-15deg);
        opacity: 1;
        visibility: visible;
    }
    100% {
        transform: translateX(200%) skewX(-15deg);
        opacity: 0;
        visibility: hidden;
    }
}

.purchase-notification.slide-in::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.68),
            rgba(185, 197, 225, 0.91),
            rgba(253, 251, 251, 0.66),
            transparent
    );
    animation: shine 0.8s ease-out 0.1s forwards;
    z-index: 1;
    pointer-events: none;
    visibility: hidden;
}

/* Fade-out animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.purchase-notification.notification-fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.book-cover {
    width: 60px;
    height: 100px;
    margin-right: 10px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.mobile .book-cover {
    width: 60px;
    height: 110px;
    margin-right: 8px;
    flex-shrink: 0; /* Prevents book cover from shrinking */
    border-top-left-radius: 0;
}

.notification-details {
    width: 300px;
    flex: 1;
    margin-right: 7px;
}

.mobile .notification-details {
    width: auto;
    flex: 1;
    margin-right: 5px;
    min-width: 0; /* Allows flex item to shrink below content size */
}

.purchase-text {
    font-size: 13px;
    color: #333;
    margin: 0;
}

.customer-name {
    max-width: 200px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.book-title {
    display: block;           /* ensures width applies correctly */
    max-width: 100%;          /* fills parent */
    white-space: nowrap;       /* prevents wrapping */
    overflow: hidden;          /* hides overflow */
    text-overflow: ellipsis;   /* shows ... */
    font-size: 15px;
    font-weight: bold;
    color: #003366;
    margin: 2px 0 3px 0;
}

.button-container {
    display: flex;
    gap: 5px;
    height: 30px;
    margin-top: 5px;
    margin-right: 5px;
    padding-bottom: 5px;
}

.mobile .button-container{
    height: 30px;
    margin-top: 5px;
}

.wishlist-btn{
    display: flex;
    align-items: center;
    font-size: 12px;
    border: 1px solid #ccc;
    background-color: #4D86C9;
    border-radius: 10px;
    cursor: pointer;
}

.wishlist-btn:hover{
    background-color: #f2f2f2;
    color: #4D86C9;
}

.wishlist-btn{
    color: white;
    padding: 6px 12px;
}


.close-btn {
    font-size: 18px;
    background-color: #d6d6d6;
    cursor: pointer;
    height: 100%;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile .close-btn{
    align-self: flex-end;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    height: auto;
    padding-right: 5px;
    margin-bottom: 5px;
}

.close-btn:hover {
    color: #333;
}