/* ===== Recently Watched feature toast (My Space) ===== */

/* toast is positioned relative to the My Space card row */
.ms-card-container {
    position: relative;
}

.rw-toast {
    display: none; /* JS shows it only when eligible */
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    z-index: 20;
    /* width: 330px; */
    width: 388px;
    max-width: 400px;
    box-sizing: border-box;
    padding: 9px 34px 10px 12px;
    background: #FFF1E6;
    border: 1px solid #F8D8BF;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(32, 41, 54, 0.12);
    font-family: Lato, sans-serif;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.rw-toast.rw-toast--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.rw-toast-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.rw-toast-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #F7801E;
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.rw-toast-title {
    color: #202936;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.rw-toast-text {
    margin: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.rw-toast-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #9AA0A8;
    cursor: pointer;
}

.rw-toast-close:hover,
.rw-toast-close:focus-visible {
    background: rgba(32, 41, 54, 0.06);
    color: #475569;
    outline: none;
}

.rw-toast-close svg {
    width: 12px;
    height: 12px;
}

/* down arrow pointing to the Recently Watched card */
.rw-toast-arrow {
    position: absolute;
    /* bottom: -6px; */
    bottom: -10px;
    left: 50%;
    /* width: 11px; */
    /* height: 11px; */
    width: 18px;
    height: 18px;
    margin-left: -5.5px;
    background: #FFF1E6;
    border-right: 1px solid #F8D8BF;
    border-bottom: 1px solid #F8D8BF;
    transform: rotate(45deg);
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .rw-toast {
        width: 100%;
        padding: 10px 36px 11px 12px;
        border-radius: 10px;
    }

    .rw-toast-badge {
        font-size: 10px;
        padding: 3px 7px;
    }

    .rw-toast-title {
        font-size: 14px;
    }

    .rw-toast-text {
        font-size: 12px;
    }

    .rw-toast-close {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
    }

    .rw-toast-close svg {
        width: 13px;
        height: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rw-toast {
        transition: none;
        transform: none;
    }
}
